home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!fnal.fnal.gov!gwatts
- From: gwatts@fnalo.fnal.gov
- Subject: Re: Verifying valid handles, how to?
- References: <1993Jan22.015520.1@fnalo.fnal.gov> <peter-230193180216@rocky.curtin.edu.au> <1993Jan26.010315.7120@wri.com> <mxmora-260193141225@css-mac1.sri.com>
- Followup-To: comp.sys.mac.programmer
- Sender: nobody@ctr.columbia.edu
- Organization: Fermi National Accelerator Lab
- Date: Thu, 28 Jan 1993 05:44:53 GMT
- Message-ID: <1993Jan27.234453.1@fnalo.fnal.gov>
- Lines: 20
- X-Posted-From: fnalo.fnal.gov
- NNTP-Posting-Host: sol.ctr.columbia.edu
-
- Hi all,
- I started off this thread. And, now I can end it. Not how I planned to
- end it.
- Originally, I had a problem that I was deleted an object twice, and that
- I was calling a method on a dead object. I'd wanted some code to check
- the object handle for validity (real object or not?).
- Thanks for all your suggestions. I tried some of them out tonight. None
- of them worked. So I followed the ThinkC code in MacsBug (ug!). OPPPS.
- Turns out that Think C optimizes away most method calls when it dosen't need
- the object dispatcher. This means the check code never gets a chance to see
- if the object is kosher. Duh.
- I can get around this. Turn off Optomize Monomorphic Methods in the
- preferences dialog. Then, it turns out that the ThinkC code will catch all
- the possible bad objects I send to it (including my original problem). So,
- the lesson is: Turn off monomprhic method opt when debugging!
- Thanks for the help, and sorry to lead y'all down a blind ally.
-
- Cheers,
- Gordon.
- - Not waaarenteed for spelling.
-