[comp.sys.mac.programmer] FindWindow moves memory

mnkonar@bigbootee.SRC.Honeywell.COM (Murat N. Konar) (05/10/89)

The list of routines that may move or purge memory in
the Inside Mac Xref doesn't include FindWindow.  Is this
an oversight or am I missing something?

When FindWindow is called, it can call the standard Apple
WDEF to see where the window was hit.  The standard WDEF
in the course of determining where the hit was calls NewRgn
(which is listed as a routine that may move or purge memory).

So what's the story?  

____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)

tecot@Apple.COM (Ed Tecot) (05/26/89)

You're absolutely right.  Apparently, this is an oversight in Inside Macintosh.
A good rule of thumb is that ANY toolbox trap may move or purge memory.  There
are exceptions to this rule, but it's better to be safe than sorry.

						_emt