Fixed crash when file changed and pe was released

CQTexperiment
vspader 2006-04-14 01:24:32 +00:00
parent 36a9a86159
commit 9413b6ec1a
4 changed files with 12 additions and 2 deletions

View File

@ -206,11 +206,14 @@
{
double tt=0;
NSEnumerator *enumerator = [[self arrangedObjects] objectEnumerator];
NSEnumerator *enumerator = [[self content] objectEnumerator];
PlaylistEntry* pe;
while (pe = [enumerator nextObject]) {
NSLog(@"Updating :%i", pe);
NSLog(@"Updating :%@", pe);
tt += [pe length];
NSLog(@"UpdateD");
}
int sec = (int)(tt/1000.0);
@ -254,6 +257,7 @@
[indexes getIndexes:indexBuffer maxCount:[indexes count] inIndexRange:nil];
for (i = 0; i < [indexes count]; i++)
{
NSLog(@"REMOVING FROM INDEX: %i", indexBuffer[i]);
[a addObject:[[self arrangedObjects] objectAtIndex:(indexBuffer[i])]];
}

View File

@ -26,6 +26,8 @@
- (void)dealloc
{
NSLog(@"DEALLOCATING A PLAYLIST ENTRY: %@", display);
[filename release];
[display release];

View File

@ -63,7 +63,9 @@
- (void)dealloc
{
NSLog(@"Releasing playlistEntry: %i", [playlistEntry retainCount]);
[playlistEntry release];
NSLog(@"Released playlistEntry: %i", [playlistEntry retainCount]);
[inputNode release];
[converterNode release];

View File

@ -119,6 +119,7 @@
- (void)setNextEntry:(PlaylistEntry *)pe
{
[pe retain];
NSLog(@"Releasing: %@", [pe display]);
[nextEntry release];
nextEntry = pe;
}
@ -151,7 +152,8 @@
BufferChain *newChain = nil;
nextEntry = [sender playlistEntry];
[nextEntry retain];
do {
[newChain release];
[self requestNextEntry:nextEntry];