I recently had to add a segment to my application because the first segment exceeded 64k and I was getting compiler errors. The users of this forum kindly helped me through this. I added Segment 5 as Preload, Protected, Locked. I chose these values because all the other segments had these values.
Those values are legacy attributes from the 68K Macintosh days. They are not used in Palm OS programming... the only thing the linker uses is the segment grouping and the order of files in each segment.
Now that I have added the segment, I am getting a huge amount of memory leaks from some of the POL objects that I am using in my application. The leaks happen when exiting the application. (invoke app, invoke a/b form, tap the home icon).
This is very, very odd. Moving your code to another segment shouldn't change anything related to dynamic memory allocation. However, leaks could occur if somehow you changed things so that the forms weren't being closed properly when your program exited, since POL relies on the close mechanism to destroy the form stack.
Check to see if this code is being run on program end, using a breakpoint set in the POL code -- I don't remember the right method, but it's likely a static method of CForm.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
