几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】memory leaks plotsettingsvalidator (http://www.dimcax.com/hust/showthread.php?t=17180)

yang686526 2009-05-06 05:39 PM

【转帖】memory leaks plotsettingsvalidator
 
memory leaks plotsettingsvalidator
memory leaks plotsettingsvalidator
i would like to know how to avoid memory leak using
oddbhostappservices:lotsettingsvalidator() method.
i am developping an output/input function of dwg files in our product.
it seems when the oddbhostappservices:lotsettingsvalidator() method is used, the memory of the pointer for the oddbplotsettingsvalidator is leaking.
if there are any solutions, please let me know.
i am looking forward to receiving your information.
thank you in advance for your attention to this matter.
dwgdirect version 1.10
[example]
class myservices : public exsystemservices, public exhostappservices
{
protected:
using exsystemservices:perator new;
using exsystemservices:perator delete;
};
odstaticrxobject<myservices> svcs;
odinitialize(&svcs);
...
oddbplotsettingsvalidatorptr oplotsettingsptr = svcs.plotsettingsvalidator(); // <--- memory leaks
oplotsettingsptr->setmediasize( ... );
oplotsettingsptr->setplotrotation( ... );
...
oduninitialize();
---------------------------------------
detected memory leaks!
dumping objects ->
c:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) :
{24442} normal block at 0x0360de68, 8 bytes long.
data: < > 84 0a 83 02 01 00 00 00
object dump complete.
thank you.
it solved.
takasugi


所有的时间均为北京时间。 现在的时间是 08:43 PM.