I'm no Palm programming "expert" that's just how I did it.

------------------------------------------------------------------
Jason Henderson
Software Engineer
EagleSoft, A Patterson Co.

"The significant problems we face cannot be solved by the same 
level of thinking that created them." - Albert Einstein


-----Original Message-----
From: Scott Johnson (Bellevue) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 2:30 PM
To: Palm Developer Forum
Subject: RE: SelectDay Function


> From: Jason Henderson [mailto:[EMAIL PROTECTED]]
> Use the following to initialize your data values to today's date:
>     DateTimeType *pDateTime =
>         (DateTimeType *) MemPtrNew(sizeof(DateTimeType));
>     /* ... */
>     MemPtrFree(pDateTime);

Can I ask, why allocate the DateTimeType structure in the dynamic heap
instead of just on the stack?  The structure is only 14 bytes.  Dynamic
allocation saves only 10 bytes of stack space and costs a lot of runtime
overhead.

-slj-
Go Mariners!


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

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

Reply via email to