[futurebasic] Re: [FB] LOCK Handles (When?)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1998 : Group Archive : Group : All Groups

From: jonathan <jonathan@...>
Date: Jeu, 29 Oct 98 04:47:53 +0100
>Any one got a _simple_ "rule of thumb" as to when to lock handles?
ALWAYS

You're supposed to only lock when the memory manager sez it'll move
memory - (that little icon in ThinkRef) but there's been so much
patching to system, and extensions that even tho' so-n-so call may
not move memory, something else might.

The overhead of locking is negliable compared to the potential
damage. The only hindrance, is that in exceptionally tight memory
conditions, the mac may not be able to grab enough memory to
execute the order (although under OS 8 and with the price of
memory nowadays, but your app might be on an older mac).
So if you only call simple FB commands, do 'rithmetic, fill in
a record - you'r safe. Anything like a bLOCKMOVE, lock first.

jonathan

-------------------------------------------------------------
! "format utile"  studio de graphisme/graphic design studio !
!      32 bd de Menilmontant, 75020 Paris, France           !
!    phone +33 1 43 49 02 04 +++ fax +33 1 43 49 16 51      !
-------------------------------------------------------------
           *** coming soon to a browser near you ***
           <http://www.cybercities.com/formatutile>
-------------------------------------------------------------