so, using the output of a CFCreate type function (in this case
copyfilesystempath) as an anonymous "stack variable" results in the
failure to CFRelease the return value of that function.
The rules in the memory management doc are simple, and this isn't an
exception to them.
The "stack variable" is just a "pointer" (reference) whose underlying
storage you have to release your reference too.
So do we say, don't use CFCreate functions on anonymous vars ?
The rules are simple enough that adding special cases to them
overcomplicates things.
The memory management rules say that if you create something, you
must release it. Ergo, you must store it in a local or equivalent so
that you can do so when you are done with the object.
how does CFURLCopyFileSystemPath know what allocator to use?
Presumably it uses the same allocator that was used to create the
URL. You can check the open source CF code if you are curious.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden