Gamua / Sparrow-Framework

The Open Source Game Engine for iOS
http://www.sparrow-framework.org
Other
294 stars 83 forks source link

Memory Leak? #48

Closed hobsynth closed 9 years ago

hobsynth commented 9 years ago

Hi, I love the library & continue to use regardless of SpriteKit!

I've been working with the latest 2.2. I noticed, not only in my project but also in your demo projects there is a slow but steady memory climb in the debugger.

PrimaryFeather commented 9 years ago

Thanks for the report! I'm happy to hear about any users not having switched to SpriteKit. :smile: @racarone — perhaps you can look into it when you've got some time? Thanks in advance!

racarone commented 9 years ago

I agree with Daniel, good to hear! =)

Well I took a look and it seems like it's a bug on Apple's side! The private IOAccelerator framework looks like the culprit and this only occurs if the EAGLContext's 'multithreaded' property is set to YES. Each time 'presentRenderbuffer:' is called with 'multithreaded' enabled, it leaks some memory down at the driver level. Sparrow 2.1 didn't use this property so it never had this problem. I've just disabled it for now until it's fixed by Apple.

f1fe commented 9 years ago

Thanks! I was seeing the same thing.

PrimaryFeather commented 9 years ago

Thanks a lot, Robert! Why am I not surprised that this is a problem with one of Apple's APIs, not Sparrow ... sigh ... we've seen that too often for my taste. :unamused:

racarone commented 9 years ago

Yup, once again! =P