"William" <[EMAIL PROTECTED]> writes:

> FldGetTextPtr() return a locked pointer to the field's text string. After
> this function is called, is it necessary to call MemPtrUnlock() to unlock
> the pointer? Right now my code doesn't unlock the pointer but the
> application seems OK. Can it cause memory leak?

It's not necessary to call MemPtrUnlock(). FldGetTextPtr() just returns
the text element of the FieldType struct, which in turn is the pointer
to the locked textHandle. However, the field manager takes care of
locking and unlocking that handle.

When the field changes, the handle may be unlocked, resized and locked
again, changing the pointer. So, you should only use the result from
FldGetTextPtr() within the scope of a single event.

-- 
Dave Carrigan ([EMAIL PROTECTED])            | Yow! Hand me a pair of leather
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | pants and a CASIO keyboard I'm
Seattle, WA, USA                            | living for today!
http://www.rudedog.org/                     | 


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

Reply via email to