On Mon, 31 Oct 2005 13:54:57, Laurence Harris <email@hidden> wrote:
> On 10/31/05 12:08 PM, Mike Kluev didst favor us with:
>
>> on Sun, 30 Oct 2005 22:09:00, Steve Baxter <email@hidden> wrote:
>>
>>> On 30 Oct 2005, at 21:31, Laurence Harris wrote:
>>>
>>>> On 10/30/05 4:03 PM, Steve Baxter didst favor us with:
>>>>
>>>>> I would use FSRefs by value here rather than storing pointers, i.e.
>>>>> store the actual FSRefs in the vector rather than a pointer to a
>>>>> FSRef. The overhead of copying 80 bytes will be so small as to be
>>>>> unmeasureable. You may actually find that the copy overhead is less
>>>>> than the malloc() overhead of allocating 80 bytes (but only Shark
>>>>> will tell you).
>>>>>
>>>>
>>>> Except it's not either/or. If you store pointers, such as is the case with
>>>> a
>>>> CF widget or a vector of FSRef pointers, once you allocate the memory for
>>>> 80
>>>> bytes, you still have to copy the FSRef into the allocated memory.
>>>
>>> True, true.
>>
>> Or FSGetCatalogInfo[Bulk] could do this copy itself.
>
> Not in this context. The FSRefs discussed are the directories returned by
> FSGetCatalogInfoBulk which are being stored for retrieval later.
Hmm...
for (count = 0;;) {
err = FSGetCatalogInfoBulk(iterator, 1, &actCount, NULL,
kFSCatInfoNodeFlags, &info, &fsRefVector[count], NULL, NULL);
if (err) break;
if (info.nodeFlags & kFSNodeIsDirectoryMask) count++;
}
Here fsRefVector contains "count" subdirectory FSRefs stored or
retrieval later.
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden