My Programming Bible (which I should have read in the first place) says I must call FrmRemoveObject to delete these dynamically created controls when closing the form. Why? Doesn't deleting the form free all this allocated memory? Even more so if the form structure gets expanded in memory when adding controls.
The basic problem is that dynamic form support hasn't worked very well, and has had a lot of bugs across different versions of Palm OS. Due to these issues, including hard-to-detect label corruption, I wouldn't use them at all on Palm OS 3.x, and only with caution on OS 4. One rule, to avoid some of the bugs, is to call FrmRemoveObject in the reverse order to which you added controls to the form. However, there is no need to call this when closing the whole form, as all of the controls have been allocated within the form's memory block, and that block is freed when the system handles the frmCloseEvent. That note is in error.
--
Ben Combee
Techwood Broadcasting Foundation, Austin Bureau Chief
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
