CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2000
    Posts
    737

    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.

  2. #2
    Join Date
    May 2002
    Location
    Russia
    Posts
    1,571
    search the SafeArrayCreate().

  3. #3
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882
    Why dont you use COleSafe Array class
    Regards,
    Ramkrishna Pawar

  4. #4
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured