Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17103

Is it need to remove event listener manually if the object is destroyed?

$
0
0

@amuse wrote:

for example, if I call:

Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(this->listener,this);

do I need to call

Director::getInstance()->getEventDispatcher()->removeEventListener(this->listener);

after the object is destroyed?

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 17103

Trending Articles