查看单个帖子
旧 2009-05-06, 05:39 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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 exsystemserviceserator new;
using exsystemserviceserator 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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)