#1884 closed defect (fixed)
Possible that smush player tries to release resource twice
Reported by: | anotherguest | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Port: Symbian |
Version: | Keywords: | ||
Cc: | Game: |
Description
After been adopting the smush player to suit Symbian OS thread handling I found a potential problem which is very easily fixed.
The Destructor of the smushplayer looks like this SmushPlayer::~SmushPlayer() { if (_initDone) release(); }
But if release() has been called by aborting the movie playback _initDone is still true, and thus release() is called twice.. once from play() and once from the destructor. release() should finish off by setting _initDone = false, as the resources now are dead.
Ticket imported from: #1098864. Ticket imported from: bugs/1884.
Change History (6)
comment:1 by , 20 years ago
Owner: | changed from | to
---|
comment:2 by , 20 years ago
comment:3 by , 20 years ago
Well it could become a problem, if you are like me,as I have to adopt functions so resources are released from the right thread. Symbian OS does n't share handles between threads, so that means that a file that have been opened in the timer thread also has to be closed there.So the easiest way for me is to reset that flag to keep track of things.
comment:4 by , 20 years ago
Status: | new → closed |
---|
comment:5 by , 20 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
comment:6 by , 6 years ago
Component: | --Unset-- → Port: Symbian |
---|
Could do that, yeah. However, there is no problem as it is now, as release() can safely be called as many time as desired.