|
-
Jan 21st, 2013, 02:07 PM
#2
Re: CopyMemory Shift Array one position
I've not used VB6 in a while but...
It looks to me like you are just copying the safearray pointers rather than the data.
If any of these are lost as a result of the copymemory call (eg. #999) I think you will get a leak. Manually deallocate any of these before the call to copymemory (Erase m_CellRows(999)).
The copymemory call from the example will also create a second reference to array #2. After the call I think the original needs to be deallocated using copymemory or similar to avoid the garbage collection running twice on the same object (something like CopyMemory ByVal VarPtr(m_CellRows(2)), 0, 4)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|