I just fixed this problem. I now use two Char arrays instead, and it works
fine. :)

"christer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have two global variables:
>
> Char *downloadX;
> Char *downloadY;
>
> In StartApplication() I do:
>
> downloadX = (Char*)MemPtrNew(1024);
> downloadY = (Char*)MemPtrNew(1024);
>
> And i StopApplication() I do:
>
> MemPtrFree(downloadX);
> MemPtrFree(downloadY);
>
> POSE gives me a "bus error" because of the MemPtrFree() calls in
> StopApplication(). If I skip the
> MemPtrFree part, I get memory leak warnings. How can I free that memory
> without causing the "bus error"?
>
> My PilotMain goes like this:
>
> --
> Err err = 0;
> if(launchCode == sysAppLaunchCmdNormalLaunch){
>     if((err = StartApplication()) == 0){
>         EventLoop();
>         StopApplication();
>     }
> }
> return err;
> --
>
> The reason I have those two globals variables is that I need them on
several
> forms. If you guys have some better ideas on how to store information some
> other way that can be used on several forms, please let me know. :)
>
> Thanks.
>
> -- 
> Christer Edvartsen
>
>
>



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

Reply via email to