Skip to content

delete temporary buffer in ofAppGlutWindow #2818

Merged
merged 2 commits into from Feb 20, 2014

2 participants

@saki7
saki7 commented Feb 20, 2014

This fixes #2817.

@arturoc
openFrameworks member
arturoc commented Feb 20, 2014

thanks, btw we are not using ofAppGlutWindow as default anymore, so this error is probably also in ofAppGLFWWindow, if you don't mind checking that too?

Also have you checked if this doesn't crash the application? my suspicion is that Xwindows doesn't copy that buffer and instead just uses what you pass to it so deleting it would crash the app after a while, but not sure

@saki7
saki7 commented Feb 20, 2014

I have just gone through Xlib's source, and it seems like it's copying the buffer to its internal buffer.
XChangeProperty delegates to Data and Data copies the buffer.

So it's safe to delete, I guess.

Is ofAppGlutWindow not default anymore? Could you tell me, about what time has it changed? Weeks ago or months ago?
I mainly use the latest stable release, so I'm not aware of recent changes.

I have found a same bug in ofAppGLFWWindow and just pushed the fix for it too.

@arturoc
openFrameworks member
arturoc commented Feb 20, 2014

great thanks! yes ofAppGLFWWindow is the default since 0.8.0

@arturoc arturoc merged commit e79c8ae into openframeworks:master Feb 20, 2014
@saki7
saki7 commented Feb 20, 2014

Thanks for merging.
Yeah I was dumb... I actually found the error on the GLFW version and was investigating on GLUT version of the source. Lucky that you pointed it out.

@saki7 saki7 deleted the saki7:ofAppGlutWindow-leak-fix branch Feb 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.