Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Convert the char to an wchar_t

<< < (2/2)

dgrafix:
Hi thanks for posting this, however, why is this needed?
delete[] wc_out;


Unless its returning the pointer shouldnt it automatically get dumped on function return?

Deschamps:

--- Quote from: dgrafix ---however, why is this needed? delete[] wc_out;
--- End quote ---

AFAIK, all the dynamicly reserved memory *must* be explicitly unassigned using 'delete' for avoiding memory leaks, and obviously it must be done while the object is accesible (i.e. before returning the function).

Navigation

[0] Message Index

[*] Previous page

Go to full version