advertisement

Article:
  Programming with Spotlight
Subject:   Memory Leaks
Date:   2006-02-06 05:07:47
From:   Tim.Scheffler
Great tutorial, explaining much of the Cocoa Spotlight interface I've been missing in Apple's documentation.


I don't know if this is of interest and I am not that much of an expert in carbon programming, but I think the implementation of the (IBAction)displayMetadataAction:(id)sender method has memory leaks:


One has to append a



if (ref != NULL) CFRelease(ref);


into the while loop
and a



CFRelease(item);
CFRelease(attributeNames);


at the end of the method.