jensmeder / DarkLightning

Simply the fastest way to transmit data between iOS/tvOS and OSX
MIT License
333 stars 39 forks source link

Memory leak when stopping and starting JMUSBDeviceManager #35

Closed kirankunigiri closed 7 years ago

kirankunigiri commented 7 years ago

To get around the fact that the iOS app needs to be started before the OSX App, I created a timer that runs every second and stops and starts the JMUSBDeviceManager. Although this solution works, the app gradually increases its memory use to the point where it freezes and crashes.

I have tried de-initializing the JMUSBDeviceManager and creating a new one, along with the JMUSBDevice, and disconnecting and de-initializing the JMUSBDeviceConnection during each restart. However, the memory use stays the same and always crashes.

Is there a better way to allow the apps to connect no matter which one is first? And is the memory problem due to how I am handling them, or is it a problem within the classes themselves?

jensmeder commented 7 years ago

Fixed in 2.0.0-alpha1.