osgLibRocket memory leaks!

9 views
Skip to first unread message

Paul Dean

unread,
Jul 8, 2014, 4:28:58 PM7/8/14
to dtenti...@googlegroups.com
Ok..  I've been trying for 6 days! to remove the memory leaks osglibrocket leaves when closing the app.  The mixing up of reference pointers and normal pointers is making things damn near impossible to pinpoint. I've tried so many things and I'm ripping my hair out!!! 

It's seems that the GuiNode wants to close some of the same things that RenderInterface wants to close.. 
I've tired every order!  This is the closest I've got

**** Shutdown sequence ****
guicam->removeChild(guinode);
root->removeChild(guicam);
delete guinode;
Rocket::Core::Shutdown();
delete guifile;;
delete guisystem;
//delete guirenderer; //HEAP CRASH if I delete guirenderer..   memory leaks without it.. 


NOW..  if I remove this line from the gui creation..  no memory leaks..  but no GUI either..
guicam->addChild(guinode); // add gui as child to cam


This has been driving me insane for 6 days..  And.. of course it's the ONLY thing holding me back from completing my project.
Any help would be greatly appreciated. 













Riccardo Corsi

unread,
Jul 9, 2014, 7:00:23 AM7/9/14
to dtenti...@googlegroups.com
Hi Paul,

first of all please expect little support on dtEntity, as the project
is no more actively developed.
The lead developer is now working on a Qt based entity system:
https://github.com/martinscheffler/qtentity

Regarding your issue, I can't say much because I don't use the
osgLibRocket module included in dte.
But if you're using ref pointers to hold a reference to your scene
(for instance a ref_ptr to root node)
you don't need to explicitly delete anything: when all ref_ptr to root
will go out of scope, they will delete all scene,
including the guicam node.
In my opinion, you can safely shutdown() rocket even before this happens.

My 2 cents,
ricky
> --
> You received this message because you are subscribed to the Google Groups
> "dtEntity developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dtentity-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages