- // The last param of SetArray is set to 1 to keep the class from deleting the array when it cleans up or reallocates memory.
- tarray->SetArray( data, size, 1 );
+ // The last param of SetArray is set to 1 to keep the class from deleting the array
+ // when it cleans up or reallocates memory.
+ int dndesa = 0;
+ if (do_not_desalloc)
+ dndesa = 1;
+ tarray->SetArray( data, size, dndesa );