If TextureInit is, for example, a singleton that persists for the life of the application, then it's destructor never gets called. However, it only allocates once. If this is the case, then technically speaking it's not a leak, at least not the kind of leak that would impact anyone's application.
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Bourdier Sent: Friday, September 19, 2008 8:35 AM To: osg Subject: [osg-users] ref_ptr wrong utilisation ? Hi, Looking for memory leaks, Visual Leak Detector return me that : ---------- Block 0 at 0x01F12C18: 100 bytes ---------- Call Stack: z:\projets\easymonitoring\3dem\trunk\include\terrain\textureinit.h (39): TextureInit::TextureInit z:\projets\easymonitoring\3dem\trunk\src\terrain\terrain.cpp (21): `dynamic initializer for 'textureInit'' f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup 0x7C816FD7 (File and line number not available): RegisterWaitForInputIdle Data: [...] with the following code : class TextureInit { public: TextureInit( unsigned int numCol, unsigned int numRow ) { [...] _texCoord = new osg::Vec2Array( numCol * numRow ); //l 39. [...] } ~TextureInit() { _texCoord = NULL; } //get method returning ref_prt [...] protected: osg::ref_ptr<osg::Vec2Array> _texCoord; } TextureInit is declarer as a global delcaration... maybe this can be the only problem.. Any idea ? Thanks, Regards, Vincent.
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org