Path: utzoo!mnetor!uunet!husc6!mailrus!ames!pasteur!ucbvax!decwrl!nsc!voder!apple!winkler
From: winkler@Apple.COM (Dan Winkler)
Newsgroups: comp.sys.mac.hypercard
Subject: Why I Copy XCMDs before executing them
Message-ID: <9379@apple.Apple.Com>
Date: 7 May 88 17:22:33 GMT
References: <50965@sun.uucp> <454@sequent.cs.qmc.ac.uk> <12609@santra.UUCP>
Reply-To: winkler@apple.UUCP (Dan Winkler)
Distribution: comp
Organization: Apple Computer Inc, Cupertino, CA
Lines: 6

The reason I copy XCMDs before executing them is that the original copy
is returned to me by the resource manager.  If the XCMD goes to another
stack, the resource fork it came from gets closed and the memory it
resides in gets deallocated.  An improvement I might make is to copy
the XCMD just once and save that copy (in a purgeable handle) so that
all successive invocations would not require any copying.