Your are not allocating memory for the chunk you are using, but you
are kind of laying claim to it for a while.  Yes, you should release
the record handle when you are done with it.

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!


Jason Davidson wrote in message <[EMAIL PROTECTED]>...

Handles are not created by the OS all Willy Nilly when you call
DmGetRecord() it returns a handle to the record, but to use it as a pointer,
you still have to Lock / Unlock it yourself.  You are not allocating memory
for the chunk you are using.

Jason D

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, July 25, 2000 3:45 AM
To: Palm Developer Forum
Subject: Freeing handles, a good practice?

Hi all, I have something that's been bugging me. In school we've been
taught to do memory clean-ups whenever we can, so for every malloc(), we
have to do an equivalent free().

Now, in PalmOS, when we do a DmGetRecord(), is a new handle is created
by DmGetRecord()? Just after DmReleaseRecord(), does the OS
automatically automatically free that handle?

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to