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

Additional memory leaks #130

Closed
palemieux opened this issue Sep 16, 2018 · 2 comments · Fixed by #131
Closed

Additional memory leaks #130

palemieux opened this issue Sep 16, 2018 · 2 comments · Fixed by #131

Comments

@palemieux
Copy link
Contributor

def_copy not freed if addition to dictionary fails at

def_copy not freed if addition to dictionary fails at

def_copy allocated but never used at

Definition *def_copy = new PropertyAliasDefinition(def);

ft and parser never deleted at MetaDictionaryTest.cpp

@palemieux palemieux self-assigned this Sep 16, 2018
palemieux added a commit that referenced this issue Sep 16, 2018
Fixed KLVStream memory leaks (#129)
Fixed misc memory leaks (#130)
@ErikCJohansson
Copy link
Contributor

I searched for 'new ' to take a look at any additional allocations. I see that the pattern 'throw new' is used in several places. I believe this is a mistake as it will throw a pointer to a dynamically allocated object, which will leak unless there is a corresponding 'catch' with the correct type that calls 'delete' on the thrown object.

@palemieux
Copy link
Contributor Author

throw new

Ah. Good catch. Leftover from Java conversion.

palemieux added a commit that referenced this issue Sep 18, 2018
Added memory leak checking to Travis script
@palemieux palemieux added this to the Release 1.1.3 milestone Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants