Hi Robert,

The additionnal ref_ptr<>s are here to stick to RAII: if an exception is thrown between 
the 'new' and the addition to the scene graph, the ressource will correctly be deallocated (I 
have lots and lots of "std::bad_alloc" in my current project because of massive RAM 
usage). So If you consider them as harmless, I guess they can be kept.

However, I thought the delete-thing solved a leak. Unfortunately I don't have 
the code in front of me, so I'll investigate and tell you ASAP.

Cheers,

--
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Fri, 08 Jan 2010 11:53:11 +0100, Robert Osfield <[email protected]> a 
écrit:

Hi Sukender,

I've just reviewed your changes and they introduce memory leaks
without fixing any... The extra ref_ptr<>'s you've added won't fix any
leaks as once you pass the arrays to the scene graph nodes the ref
counting will be done automatically.  The new leaks you've introduced
is the removal of the delete of the 3ds centric arrays such as "delete
[] normals;".

The other changes look OK so I've merged these and checked them into
svn/trunk.  If there are specific memory issues that you are aware of
could you enumerate these so we can look at the best way of solving
them.

Cheers,
Robert.

On Mon, Dec 28, 2009 at 9:16 AM, Sukender <[email protected]> wrote:
Hi Robert,

ReaderWriter3DS.cpp fixes:
- Fixed memory leak (+ replaced some raw ptrs by ref_ptrs. Could be nice to 
finish this job!)
- Fixed creation of useless intermediate nodes

WriterNodeVisitor.cpp fixes:
- Fixed naming of textures (path and extension)

(Against trunk rev. 10902)

Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to