diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-14 22:10:02 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-14 22:10:02 +0000 |
| commit | f04fe325fc0bc79969fe46eca16898aa04e139ed (patch) | |
| tree | 05721515c2ba1e82772a61b04da3fa9ada2cfcf5 /macosx/PluginList.m | |
| parent | fba17b7792445b0e97f4c10952950b4546b27f90 (diff) | |
| download | pcsxr-f04fe325fc0bc79969fe46eca16898aa04e139ed.tar.gz | |
Make sPluginList in PluginList.m unsafe-unretained so we can properly free it when other sources are done with it.
I didn't notice that the OS X app controller had a PluginList instance variable: use that instead of calling +[PluginList list].
A few other minor changes.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82281 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PluginList.m')
| -rwxr-xr-x | macosx/PluginList.m | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/macosx/PluginList.m b/macosx/PluginList.m index 6fa341d9..813f0f58 100755 --- a/macosx/PluginList.m +++ b/macosx/PluginList.m @@ -14,7 +14,7 @@ #import "ARCBridge.h" //NSMutableArray *plugins; -static PluginList *sPluginList = nil; +static PluginList __unsafe_unretained *sPluginList = nil; const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, PSE_LT_NET}; @implementation PluginList @@ -133,18 +133,22 @@ const static int typeList[5] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, - (void)dealloc { - RELEASEOBJ(activeGpuPlugin); - RELEASEOBJ(activeSpuPlugin); - RELEASEOBJ(activeCdrPlugin); - RELEASEOBJ(activePadPlugin); - RELEASEOBJ(activeNetPlugin); - - RELEASEOBJ(pluginList); - if (sPluginList == self) sPluginList = nil; + +#if !__has_feature(objc_arc) + + [activeGpuPlugin release]; + [activeSpuPlugin release]; + [activeCdrPlugin release]; + [activePadPlugin release]; + [activeNetPlugin release]; - SUPERDEALLOC; + [pluginList release]; + + + [super dealloc]; +#endif } - (void)refreshPlugins |
