mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix memory leak in Video Window on Mac (QTKit)
Need to call QTMovie::deallocate before setMovie to ensure it is free'd by the QTMoveView.
This commit is contained in:
@@ -97,9 +97,12 @@ static inline NSString *darwinQStringToNSString (const QString &aString)
|
||||
void VideoWindow::mediaSelected(QString filename)
|
||||
{
|
||||
// stop any current playback
|
||||
stopPlayback();
|
||||
hasMovie = false;
|
||||
movie = NULL;
|
||||
if (hasMovie) {
|
||||
stopPlayback();
|
||||
[movie invalidate]; // let the view deallocate
|
||||
hasMovie = false;
|
||||
movie = NULL;
|
||||
}
|
||||
|
||||
// open the movie file
|
||||
if (filename != "" && QFile(filename).exists()) {
|
||||
|
||||
Reference in New Issue
Block a user