First of all, you should post some code where you think your error lies.
Second, maybe you shoudl buy a book about C/C++ !? MemPtrNew() and MemPtrFree() correspond to malloc() and free() in C.

Char *gBuffer = NULL;

void AppStart(){
        gBuffer = (Char*)MemPtrNew(1000);
}

void AppStop(){
        if(gBuffer != NULL){
                MemPtrFree(gBuffer);
                gBuffer = NULL;
        }
}

Thomas

Micky MeNeZeS schrieb:
Hi,

I am using a Char * variable globally.

I am doing the initialization of this using MemPtrNew and deletion of the same MemPtrFree

I am initializing the memory of 1000 bytes at a time.

My program works fine but once I come out of that application and try to access some other application Palm TX reboots itself.

I tried using the same variable as

1) Char* buffer;

2) Static Char* buffer = NULL;

And Char buffer [1000];

In first case and last case Palm TX gets rebooted after I exit the application and try to access some other application.

In second case Palm TX gets hanged.



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

Reply via email to