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

Plug memory leaks #510

Closed
wants to merge 1 commit into from
Closed

Plug memory leaks #510

wants to merge 1 commit into from

Conversation

xlz
Copy link
Member

@xlz xlz commented Dec 18, 2015

These are some major leaks caught with valgrind.

There may be many other small ones. There may be some leaks that happen in graphics drivers. I'm not entirely sure. Comments are needed.

This does not include fixes for leaks in viewer.cpp.

Tested only on Debian right now. Reviews are needed.

@floe floe added this to the 0.1 milestone Dec 20, 2015
@ahundt
Copy link

ahundt commented Dec 27, 2015

I ran the clang static analyzer in Xcode and got a few minor things there:

/Users/athundt/source/git/libfreenect2/examples/viewer.cpp:10:9: Value stored to 'init' during its initialization is never read
/Users/athundt/source/git/libfreenect2/src/cpu_depth_packet_processor.cpp:705:9: Value stored to 't10' is never read
/Users/athundt/source/git/libfreenect2/examples/Protonect.cpp
/Users/athundt/source/git/libfreenect2/examples/Protonect.cpp:141:27: Potential leak of memory pointed to by 'filelogger'
/Users/athundt/source/git/libfreenect2/examples/Protonect.cpp:120:6: Assuming 'executable_name_idx' is equal to 'npos'
/Users/athundt/source/git/libfreenect2/examples/Protonect.cpp:135:30: Memory is allocated
/Users/athundt/source/git/libfreenect2/examples/Protonect.cpp:141:27: Potential leak of memory pointed to by 'filelogger'

@floe
Copy link
Contributor

floe commented Dec 27, 2015

@ahundt did you happen to test this PR on MacOS X?

@ahundt
Copy link

ahundt commented Dec 27, 2015

@floe sorry, I actually ran it on bc5c978

@xlz
Copy link
Member Author

xlz commented Dec 27, 2015

I think filelogger is fixed in here.

@xlz
Copy link
Member Author

xlz commented Jan 7, 2016

Self-review seems fine. I'll merge this into another bigger PR for the ease of testing.

@xlz xlz closed this Jan 7, 2016
@floe
Copy link
Contributor

floe commented Jan 7, 2016

Mmh. I was hoping to leave this as the very last one for 0.1, what else do you have in mind?

@xlz
Copy link
Member Author

xlz commented Jan 7, 2016

#530 Gotta have versions

@xlz xlz deleted the memleaks branch January 7, 2016 23:38
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.

3 participants