This is probably a basic newbi question, but I cannot find what I'm
doing wrong.

I'm trying to learn Palm programming, using the "Palm Programming Bible"
book by Foster and the O'Reilly "Palm Programming" book.  Both of these
books have a simple "hello world" type of application.  If I run either
one in 'pose', on exit it reports at least 3 memory leaks.  Looking at
the output in the log file doesn't tell me much since the stack trace
looks like the problem is in a library routine (surly there isn't a leak
in the SDK?).

I've reduced the program down to as simple a program as I think I can
get away with: just a form with nothing on it except the title and the
only events that the form event handler deals with is "frmOpenEvent" (in
which case it calls 'FrmDrawForm()' to draw the empty form) and
"appStopEvent" (call 'FrmDeleteForm()').  I still get 2 memory leaks. 
I'm about ready to pull out what little hair I've got left.

One thought I had is that the ROM image that I'm using is from my
Handspring (Palm OS v3.5.2) and I'm using SDK 5.  Possible
incompatibility?

I'm using gcc on a Linux system to do my development.  Has anybody else
run into something like this?  The log entry (minus chunk contents) for
the leaks are:
================================8<---------------------------------
0.000:  Relocatable chunk leaked at 0x00002796, size = 40
0.000:  Chunk allocated by:
0.000:          WinCreateBitmapWindow
0.000:          WinCreateOffscreenWindow
0.000:          WinSaveBits
0.000:          FrmDrawForm
0.000:          <Unknown @ 0x00052358>
0.000:          PrvSendEventToForm
0.000:          FrmDispatchEvent
0.000:          <Unknown @ 0x0005244C>
0.000:          <Unknown @ 0x00052482>
0.000:          <Unknown @ 0x00052286>
================================8<---------------------------------
0.000:  Non-relocatable chunk leaked at 0x00034FF4, size = 3380
0.000:  Chunk allocated by:
0.000:          BmpCreate
0.000:          WinCreateOffscreenWindow
0.000:          WinSaveBits
0.000:          FrmDrawForm
0.000:          <Unknown @ 0x00052358>
0.000:          PrvSendEventToForm
0.000:          FrmDispatchEvent
0.000:          <Unknown @ 0x0005244C>
0.000:          <Unknown @ 0x00052482>
0.000:          <Unknown @ 0x00052286>
================================8<---------------------------------

Thanks in advance for any insight.

        /dwight
-- 
Dwight N. Tovey
Email: [EMAIL PROTECTED]
http://www.dtovey.net/dwight
---
Needing someone is like needing a  parachute: If he isn't there the first time you 
need him, chances are  you won't be needing him again.


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

Reply via email to