kill field handle&
This statement disposes of the specified handle. This means that the memory block referenced by
handle& gets released, and the value in
handle& is thereafter no longer a valid handle.
kill field is commonly used with handles returned by
get field or
read field, but it can dispose of any kind of handle. However, you should specifically not use it to dispose of resources, regions, window controls, and other "standard" kinds of Macintosh objects which are created and managed by the MacOS. Instead, you should use the appropriate Toolbox routine (ReleaseResource, DisposeRgn, DisposeControl, etc.) to dispose of such objects.
kill field is similar to the Toolbox call
DisposeHandle, except that it (like the
DisposeH statement) checks for
_nil handles and sets the
handle& variable to zero.
DisposeH; read field