Page 1 of 1

delete compositor logic - patch ?

Posted: Thu Apr 01, 2010 9:08 am
by moagames

looking into the ogre source and the compositor demo, i just couldn't see, where the registered compositor logics are deleted.
In the demo the compositor logic is registered through

Code: Select all

compMgr.registerCompositorLogic("HDR", new HDRLogic);
so there is no pointer to this logic saved to delete upon shutdown. Also in the ogre source i couldn't find any code that deletes all registered compositor logics upon shutdown (what i would prefer). I couldn't even find a way to unregister the compositor logic manually once it isn't needed anymore.
Is this really a memory leak in ogre/compositor demo and a missing feature, or am i just missing something ?


Re: delete compositor logic

Posted: Tue Apr 06, 2010 9:06 am
by moagames
I looked a bit deeper in the Ogre code and still couldn't find any call to delete the registered Compositor logics.
Furthermore I saw, that the same issue also exists with "registerCustomCompositionPass.

So I now changed Ogre a bit and added the possibility to delete registered compositor logics and custom composition passes (single ones or all registered at once).
Also an auto delete at shutdown is added.

If needed, I can submit a patch for this change.

Re: delete compositor logic - patch ?

Posted: Sat Sep 18, 2010 6:52 pm
by FlorianGeorge
I ran into the same issue playing with the Gaussian Blur compositor from the same demo. Visual Leak Detector doesn't like this one bit.

I am very interested in your unregisterCompositorLogic code and would like to see your patches being added to the official ogre source.

Re: delete compositor logic - patch ?

Posted: Wed Dec 22, 2010 3:46 pm
by FlorianGeorge

Re: delete compositor logic - patch ?

Posted: Mon Jan 03, 2011 2:54 pm
by moagames
I submitted the patch to the mantis ticket.


Re: delete compositor logic - patch ?

Posted: Mon Feb 14, 2011 6:34 pm
by FlorianGeorge
Tested the changes dark_sylinc committed to the 1.8 unstable mercurial.

For both the Compositor Sample and the Deferred Shading Sample, Visual Leak Detector 2.0b doesn't detect any leaks anymore.

Guess you can close this as fixed now.

Re: delete compositor logic - patch ?

Posted: Tue Sep 10, 2013 3:49 pm
by arkeon
In Ogre 1.8 unregisterAllCustomCompositionPasses and unregisterCustomCompositionPasse are gone ?!

Re: delete compositor logic - patch ?

Posted: Wed Feb 18, 2015 9:33 pm
by cyrfer
I've come across this several times. I wonder what ever came of it.