I am developing on Windows in C/C++ unmanaged with DevStudio.
I want to allocate some memory on the stack instead of the heap, because I don't want to have to deal with releasing that memory manually, similar to the use of A2W() and W2A() macros.
- I know about smart pointers and all those things. I have a very specific case of memory allocation I need to deal with.
_alloca does that, but it is deprecated. It is suggested to use _malloca instead. But _malloca documentation says that a call to _freea is mandatory for each call to _malloca. It then defeats my purpose to use _malloca, I will use malloc() or new instead.
Anybody knows if I can get away with not calling _freea without leaking, and what the impacts are internally?
Otherwise, I will end-up just using the deprecated _alloca function.