Browser, memory leak, missing delete

Description

In function SampleBrowser::shutdown (which overrides function SampleContext::shutdown),

It has this (at the bottom):

mWindow = 0;

SampleContext::shutdown();

For this, function SampleContext::shutdown can no longer correctly remove the handler when it calls this:

Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this); /* mWindow - it is NULL! =o */

FIX:

In function SampleBrowser::shutdown:
/* mWindow = 0; / / Don't nullify it here! >_< */

Then, in function SampleContext::shutdown:
Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this), mWindow = 0; /* Instead, nullify it here! XD */

Have a nice day! =D

Environment

None

Activity

Philip Allgaier 
July 15, 2016 at 12:16 AM

Fixed in 1.9.0 with commit https://bitbucket.org/sinbad/ogre/commits/108ab0bcc69603dba32c0ffd4bbbc39051f421c9

Needs to be merge into 1.10.0

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created September 22, 2015 at 2:30 PM
Updated July 15, 2016 at 12:16 AM
Resolved July 15, 2016 at 12:16 AM