1 Reply Latest reply on Dec 22, 2009 4:27 AM by gaurav.garg

    delete array


      Hello I noticed that it isn't possible to send vector array's to the GPU with the streamRead() function. That's why I declared a 2D array with pointers. Afterwards i read the stream from the gpu with streamWrite() into my 2D array. When I'm done with this I want to delete my array (for memory leakage) When i use the keyword delete[] on my array my program gives me a runtime error. I only get it when i use the delete[] AFTER i used the streamWrite() function. anyone got a clue how to solve this?


      grtz Lyven

        • delete array

          You cannot pass 2D arrays to streamRead or streamWrite. These methods work similar to memcpy where pointer passed must be a single chunk of data with number of bytes = stream width * stream height * sizeof(stream data type)