几何尺寸与公差论坛------致力于产品几何量公差标准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 managemen (http://www.dimcax.com/hust/showthread.php?t=17185)

yang686526 2009-05-06 05:40 PM

【转帖】memory managemen
 
memory management
memory management
hi,
is it possible to supply customised new/delete operators for the dwgdirect?
i know it is possible to supply the functions
odrxalloc
odrxrealloc
odrxfree
but these only appear to be used sometimes. there does not appear to be possible to pass down any template traits to the library.
(ie) in the loki tradition.
regards,
hanh
hi, i'm fan of loki too. but dwgdirect and objectarx are not template libraries. i think you have some "hooks" where you can place your own memory management. one is the class exundocontroller. others may be oddbpagecontroller, oddbfiler, etc...
chudomir
you can define your own global new and delete operators (make sure you do not link in our alloc lib if you do this). if you do this, along with defining odrxalloc, odrxrealloc, and odrxfree, you should get access to all dwgdirect memory allocations.


所有的时间均为北京时间。 现在的时间是 10:45 AM.