Page 1 of 1

LocalAlloc vs. calloc

PostPosted: May 17, 2003 @ 7:03pm
by RICoder

PostPosted: May 18, 2003 @ 5:58pm
by Digby

PostPosted: May 18, 2003 @ 11:13pm
by RICoder

PostPosted: May 19, 2003 @ 4:20pm
by Guest

PostPosted: May 19, 2003 @ 6:23pm
by RICoder

PostPosted: May 22, 2003 @ 12:02pm
by Guest

PostPosted: May 25, 2003 @ 12:14am
by efortier

PostPosted: May 25, 2003 @ 8:21am
by RICoder
faster, maybe...mostly because you are not going through the constructor/destructor as you would in your example. You are also going under the assumption that something, like TCHAR, has a valid class definition.

calloc is the same as malloc except that it sets the memory to zeros on allocation.

in essense, all you are doing is allocating raw memory from the heap. it is not instantiated classes or anything else, and it is not bound to any datatype.