Hi Andrew,
When changing this, to be more in line with the "HV" code...
diff --git a/cinelerra-5.1/cinelerra/playbackengine.C
b/cinelerra-5.1/cinelerra/playbackengine.C
index 815e506f..3c2a9368 100644
--- a/cinelerra-5.1/cinelerra/playbackengine.C
+++ b/cinelerra-5.1/cinelerra/playbackengine.C
@@ -172,9 +172,9 @@ void PlaybackEngine::create_cache()
{
cache_lock->lock("PlaybackEngine::create_cache");
if( audio_cache )
- audio_cache->remove_user();
+ delete audio_cache;
if( video_cache )
- video_cache->remove_user();
+ delete video_cache;
audio_cache = new CICache(preferences);
video_cache = new CICache(preferences);
cache_lock->unlock();
...will result in a fix for the memory leak, but does cause a warning
message.
Garbage::~Garbage: title=CICache users=1 was not deleted by
Garbage::remove_user
This was changed with f5725c7e (7/4/20). But also shows that many unrelated
changes cause real issues to hide. I found this by hand, not even using git
bisect. I understand the urge for the garbage collector, but for some
reason not behaving. What I notice is that the 'last' object is empty when
it is actually destroyed by the garbage collector (~CICache). What is the
best way going forward?
sorry, I am not programmer enough for answering this ..
but you tried to leave both lines there?
also, I did
grep remove_user cinelerra/*
and among results
cinelerra/mwindow.C: if( audio_cache ) { audio_cache->remove_user(); audio_cache = 0; }
cinelerra/mwindow.C: if( video_cache ) { video_cache->remove_user(); video_cache = 0; }
[..]
cinelerra/fileref.C: if( acache ) { acache->remove_user(); acache = 0; }
cinelerra/fileref.C: if( vcache ) { vcache->remove_user(); vcache = 0; }
so may be nulling it after remove_user actually intended?