[futurebasic] Re: Do handles to resources need to be locked?

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

From: Charlie Dickman <charlied@...>
Date: Mon, 26 Jan 1998 17:08:07 -0500
>  I was looking over some code in my program and all of a sudden I got
>nervous. The following bit of code works, but should I be locking resHand&
>before copying data from it?

If you don't, and something you do causes the memory manager to move things
around, you could be in for all sorts of nasties; anything from getting bad
data to bus errors that result from referencing addresses that don't exist
to system hangs and crashes. Don't forget to unlock it when you no longer
need it pinned down.

Charlie Dickman
charlied@...