I'm trying to implement Spotlight through declares but I have a memory leak with every query I launch.

AFAIK I declare only one function that allocates memory hence I presume that should be the only one to release. When I try to release it however, my application just crashes.

Here's the function that allocates memory:

  MDQueryRef MDQueryCreate (
  CFAllocatorRef allocator,
  CFStringRef queryString,
  CFArrayRef valueListAttrs,
  CFArrayRef sortingAttrs
  );

After I execute the query and store its results, I'm done with it and want to release the memory:

  CFRelease MDQueryRef

This gives a hard crash.

If anybody can give me any clue, like do I release it too soon, do I have to do something else to release it, are there some dependencies I'm not aware of, etc.

Thanks,

Marc
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to