Hello all, I have a problem of sorts.  It seems that if I call MemPtrResize
on the same variable more than once I get a fatal error.   Anyone else had
this problem?  (POSE says that I have written directly to memory manager.
Heres the code I use:

<pseudo code>

(global variable) char** string;
(global variable) UInt   CurrentNumberofStrings = 0;
(string was MemPtrNew()'d before this.)
(CurrentNumberofStrings contains the number of strings that "string" has
when it was initialized)

</pseudo code>

<code>

MemPtrResize(string, sizeof(char *) * CurrentNumberofStrings + sizeof(char
*));
string[CurrentNumberofStrings] = (char *)MemPtrNew(StrLen(ptr) + 1);  //
line that POSE indicates problem
CurrentNumberofStrings++;

</code>

Now, that works the *first* time I call this code, but on a subsequent call
I get the error.

Anyone know why?  I really appreciate any feedback.


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

Reply via email to