ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcDbEntity in Drawingdatabase or not

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
479 Views, 2 Replies

AcDbEntity in Drawingdatabase or not

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
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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...
Message 3 of 3
Anonymous
in reply to: Anonymous

I was under the impression that this would cause problems. Have you done this before Byron? Jon Rizzo Langan Engineering and Environemtal Services, Inc. > 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...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost