Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

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

1 Reply
Adept I

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)