If you allocate it, you have to free it. There
is no automatic garbage collection.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
Charles Rezsonya wrote in message <[EMAIL PROTECTED]>...
>
>hello,
>
>if i have a function ,..
>
>char* getString(void) {
> char* returnString;
> returnString=MemPtrNew(50);
> StrCopy(returnString, "heya");
> return returnString
>}
>
>that returns a ptr to this string, do i have to call memPtrFree to free it
>in its parent? or does the 'greeting' ptr automaticly free itself when it
>exits the 'test' function? i don't get errors doing so, so i think its
>freeing it. any ideas?
>
>ie,
>
>void test(void) {
> char* greeting;
> greeting=getString();
> MemPtrFree(greeting); <---- do i need to call this when exiting
>the function?
>}
>
>
>
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/