For some reason PODS 1.2 indicates an error via a red square in the upper 
right hand corner of the editor whenever I try to release an unmovable chunk 
of memory by MemPtrFree(p). Perhaps I'm using it incorrectly or perhaps a 
bug in PODS??  I have included a function below as an example of where an 
error occurs.  Thanks.
Jim Haines

void calcPoint(double N, double E)
{
double Az,deg;
char *ptr, s[60];
double distance;

point.ptNum= (UInt16) StrAToI(fields[1]);
StrCopy(point.desc ,fields[2]);
DMSToDeg(fields[3],'-');
StringToDouble(fields[4], &distance);
Az=BearToAz( deg, quad);
point.northing = N + distance * cos( Az / DinR);
ptr = MemPtrNew(64);
if (ptr)
{
 DoubleToString( ptr, point.northing, decimal );
 FntSetFont( boldFont );
 WinSetUnderlineMode( noUnderline);
 WinSetTextColor(red);
 WinDrawChars(ptr,StrLen(ptr),71,99);
 point.easting = E + distance * sin( Az / DinR );
 DoubleToString( ptr, point.easting, decimal );
 WinDrawChars( ptr,StrLen(ptr),71,112 );
 WinSetTextColor( black );
 //MemPtrFree (ptr); // error is here
}
return;
} 

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

Reply via email to