I testing out a program and one of the function uses a static pointer. The
pointer variable stores all the characters by the user, and has to maintain
this between function calls (the characters are then written to screen in
one truncated line). At the moment I have only allocated 100 bytes for it,
and haven't got round to checking the data doesn't overflow (I've just
started the program).

Problem is, every time I recompile and load it into POSE, the variable's
data (i.e. all the characters entered) from the last compile is still there
and now exceeds 100 bytes and so crashes the program as soon as I enter a
new character! I don't know how POSE maintains this data, and I don't want
it!

I know I could make sure the data my static pointer is pointing to get
initialised to NULL, but I want to know why this happens not how to solve
it.

--
thanks,
Ash.




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

Reply via email to