[Mono-osx] Memory Issue in QTkit

John Main themains2 at gmail.com
Fri Dec 13 23:37:19 UTC 2013


I have written a small Song Player that uses QTkit to play songs.
The program has a gui done in Interface Builder that has a skip button.

This skip button is tied to Method that Stops Playback of the Song uses the
Release and Dispose methods on the QTMovie object and then plays a new song.
This works great as expected.  I have wrapped it all in an
NSAutoreleasePool.

Now I have a Notification that when QTMovie is finished playing a song it
calls this same Method that Advances to the next song and plays it.

If I start playing a song and use the button to advance the song the memory
uses stays pretty constant going up and down as you would expect with file
sizes for the songs varying in size.  However, if I let the song finish and
the notification calls the method to advance the song the memory will
continually climb per song and is never released.

I have stepped through the code and see that the original QTMovie instance
gets released.

What am I doing wrong here?  I originally created this in xcode using
objective C but the code was very ugly since it was my first project
programming an app for the Mac.  It did not have this memory leak.

Since I am more familiar with C# (Although just a beginner) the code is
much cleaner.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20131213/6c2794b3/attachment.html>


More information about the Mono-osx mailing list