I just completed a section of code that does the following with the
1) Gets current selection
2) Sets selection to a disk entry
3) Calls the menu item 'Put Away' (aka eject)
4) Restores the selection from (1)
Looking at my Sys 6 reference, tellFinderGetSelectedIcons ($8004)
notes this: "The returned stringList handle is yours to deal
with. When you're done with it, you must call DisposeHandle on it."
There's no such note on the SetSelectedIcons ($8005), where I have
to pass a handle to the Finder.
My question is this: how soon after SetSelectedIcons can I dispose
the handle I pass to the Finder. Does the Finder copy the handle I
created, so I can dispose of my copy immediately, or what? Right now,
I'm disposing the handles I used in 1) and 4) immediately after 4),
and it seems to work. Can I count on this behavior in Finder 6.0 and
6.0.1 (only tested in 6.0.1), and the future, or what?
<*> Nathan Mates http://www.ugcs.caltech.edu/~nathan/ <*>
# And he said to them, "To you has been given the secret of the
# Kingdom of God, but for those outside, everything comes in
# parables" Mark 4:11, NRSV