W
Woodster
I knoew that free is usually paired with malloc and delete is usually
paired with malloc, alloc or similar.
Can I use delete with malloc? The main reason I ask is for using the
strdup function. If I have a char *, I have no real way of knowing
whether that char * had memory allocated for it using new or malloc (as
used by strdup).
Thanks in advance
Woodster
paired with malloc, alloc or similar.
Can I use delete with malloc? The main reason I ask is for using the
strdup function. If I have a char *, I have no real way of knowing
whether that char * had memory allocated for it using new or malloc (as
used by strdup).
Thanks in advance
Woodster