delete compositor logic - patch ?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
moagames
Halfling
Posts: 70
Joined: Thu Apr 10, 2008 8:10 pm
x 1

delete compositor logic - patch ?

Post by moagames »

Hi,

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 ?


Thanks.
Last edited by moagames on Tue Apr 06, 2010 9:07 am, edited 1 time in total.
moagames
Halfling
Posts: 70
Joined: Thu Apr 10, 2008 8:10 pm
x 1

Re: delete compositor logic

Post 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.
FlorianGeorge
Halfling
Posts: 86
Joined: Tue Sep 01, 2009 7:15 pm
Location: Cologne, Germany
x 4

Re: delete compositor logic - patch ?

Post 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.
FlorianGeorge
Halfling
Posts: 86
Joined: Tue Sep 01, 2009 7:15 pm
Location: Cologne, Germany
x 4

Re: delete compositor logic - patch ?

Post by FlorianGeorge »

moagames
Halfling
Posts: 70
Joined: Thu Apr 10, 2008 8:10 pm
x 1

Re: delete compositor logic - patch ?

Post by moagames »

I submitted the patch to the mantis ticket.

BR
FlorianGeorge
Halfling
Posts: 86
Joined: Tue Sep 01, 2009 7:15 pm
Location: Cologne, Germany
x 4

Re: delete compositor logic - patch ?

Post 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.
arkeon
Goblin
Posts: 272
Joined: Fri Dec 04, 2009 6:02 pm
x 38

Re: delete compositor logic - patch ?

Post by arkeon »

In Ogre 1.8 unregisterAllCustomCompositionPasses and unregisterCustomCompositionPasse are gone ?!
OpenSpace 3D Project manager
http://www.openspace3d.com
cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 7

Re: delete compositor logic - patch ?

Post by cyrfer »

I've come across this several times. I wonder what ever came of it.
Post Reply