Oliver Boesche wrote:
> Hello,
>
> What is the easiest way to find out if a AcDbEntity is "managed" by Autocad
> or not.
>
> AcDbLine* pLine=new AcDbLine; //This I mean by "not managed by AutoCad"
>
> With "managed" I mean that you can see this AcDbLine on AutoCAD screen. For
> example when you put the AcDbLine to the AutoCAD Modellspace.
>
> (I need this to find possible memory leaks in my application)
>
> Thanks
> Mark
>
>
AcDbObject::database() will return NULL :)
If your intention is not to add the entity to the database why create it
on the heap? That way you don't have to worry about a leak the memory
is freed when it goes out of scope...
--
Best regards,
Byron Blattel
CADwerx--Applications for AutoCAD
Autodesk Registered Developer
Contact Info @ http://www.cadwerx.net
Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...