pisselou
asked on
heap->stack
Hi,
How should you change this heap-allocation-code to stack-allocation-code ??
textel->length = 15* sizeof(int16);
textel->buffer = new int16[textel->length];
Thanks in advance.
How should you change this heap-allocation-code to stack-allocation-code ??
textel->length = 15* sizeof(int16);
textel->buffer = new int16[textel->length];
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
1) without memory leak
2) I don't have to think about placing the delete
3)maybe faster, since it's on the stack
So, thanks a lot.