-
SafeArrayAllocDescriptor
does anybody have any clue on using the function SafeArrayAllocDescriptor to create an safearray ? I only need to safearray descriptor cause i already got my data. SafeArrayCreate doesn't seem to help, as it also allocate the data buffer which cause memory leakage.
I would be appreciated if anyone can show me the correct way of using the function SafeArrayAllocDescriptor and SafeArrayCreate (together with the clean up function), thanks.
-
search the SafeArrayCreate().
-
Why dont you use COleSafe Array class
-
If you are using a SafeArray created with SafeArrayCreate and where you access the elements always through the provided functions, then most of the time you don't have to worry about memory. When you insert an item the SafeArray will copy / addref it and when removing it / deleting the safearray it will free / release it.