AcDbVoidPtrArray

AcDbVoidPtrArray

Anonymous
Not applicable
507 Views
2 Replies
Message 1 of 3

AcDbVoidPtrArray

Anonymous
Not applicable
Am I responsible for deleting the entities populating an AcDbVoidPtrArray container? Example, if I create a region using createFromCurves, that populates an AcDbVoidPtrArray object with AcDbRegion* objects. Who is responsible for freeing the memory these objects are occupying?

Mike B
0 Likes
508 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
In this special case you have to either delete the regions or add them
to a database. Normally tge ARX documentation ( search for the file
ARXREF.CHM in you ObjectARX SDK) will telly you how to handle this
situation

HTH,
Andy


mbujak schrieb:

> Am I responsible for deleting the entities populating an
> AcDbVoidPtrArray container? Example, if I create a region using
> createFromCurves, that populates an AcDbVoidPtrArray object with
> AcDbRegion* objects. Who is responsible for freeing the memory these
> objects are occupying?

Mike B

0 Likes
Message 3 of 3

Anonymous
Not applicable
mbujak wrote:
> Am I responsible for deleting the entities populating an AcDbVoidPtrArray
> container? Example, if I create a region using createFromCurves, that populates
> an AcDbVoidPtrArray object with AcDbRegion* objects. Who is responsible for
> freeing the memory these objects are occupying?
>
> Mike B
>

Yes, also make sure you cast to AcDbObject* when deleting them.

delete (AcDbObject*)array;

--
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: [email protected]
| web site: http://www.cadwerx.net
|
0 Likes