diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-10 00:04:59 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-10 00:04:59 +0000 |
| commit | 09b52df12a0dc938bdd9b4c2d36a1d13af88ca50 (patch) | |
| tree | f83efe15234716a8bf0afba10334bf5d7d4143f2 /macosx/PcsxrMemCardArray.m | |
| parent | 0fd6f9301c3d3d568fb58251bb1c38da576701a2 (diff) | |
| download | pcsxr-09b52df12a0dc938bdd9b4c2d36a1d13af88ca50.tar.gz | |
minor code tweaks.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85949 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardArray.m')
| -rw-r--r-- | macosx/PcsxrMemCardArray.m | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/macosx/PcsxrMemCardArray.m b/macosx/PcsxrMemCardArray.m index 10921030..c12f50dd 100644 --- a/macosx/PcsxrMemCardArray.m +++ b/macosx/PcsxrMemCardArray.m @@ -101,7 +101,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) i = 0; while (i < MAX_MEMCARD_BLOCKS) { x = 1; - McdBlock memBlock, tmpBlock; + McdBlock memBlock; GetMcdBlockInfo(carNum, i + 1, &memBlock); if ([PcsxrMemoryObject memFlagsFromBlockFlags:memBlock.Flags] == memFlagFree) { @@ -110,6 +110,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) continue; } do { + McdBlock tmpBlock; GetMcdBlockInfo(carNum, i + x + 1, &tmpBlock); if ((tmpBlock.Flags & 0x3) == 0x3) { x++; @@ -120,9 +121,11 @@ static inline void ClearMemcardData(char *to, int dsti, char *str) break; } } while (i + x - 1 < MAX_MEMCARD_BLOCKS); - PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock startingIndex:i size:x]; - [tmpMemArray addObject:obj]; - RELEASEOBJ(obj); + @autoreleasepool { + PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock startingIndex:i size:x]; + [tmpMemArray addObject:obj]; + RELEASEOBJ(obj); + } i += x; } self.rawArray = [NSArray arrayWithArray:tmpMemArray]; |
