Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added virtual destructors to some interfaces to fix issue 3095 #3253

Merged
merged 2 commits into from
Jul 26, 2013
Merged

Added virtual destructors to some interfaces to fix issue 3095 #3253

merged 2 commits into from
Jul 26, 2013

Conversation

metalbass
Copy link
Contributor

From #3095 :

A subclass of connection_base3 is beign deleted through a pointer of this type, which doesn't have a virtual destructor and will cause a memory leak because no other destructors will be called!!!
You can see it in sigslot.h lines 760, 872, 916...

This happens with a lot of "interfaces" of sigslot. Every class that will be inherited MUST have virtual destructors because someone could delete a object of through a pointer to them and have a memory leak.

dumganhar pushed a commit that referenced this pull request Jul 26, 2013
Added virtual destructors to some interfaces to fix issue 3095
@dumganhar dumganhar merged commit df5232e into cocos2d:develop Jul 26, 2013
@dumganhar
Copy link

Merged, thanks.

@metalbass metalbass deleted the patch-3 branch July 26, 2013 14:22
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
Added virtual destructors to some interfaces to fix issue 3095
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
Added virtual destructors to some interfaces to fix issue 3095
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 30, 2014
Added virtual destructors to some interfaces to fix issue 3095
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 30, 2014
Added virtual destructors to some interfaces to fix issue 3095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants