In dotNET we could write unmanaged code, where can I allocate memory dynamically (by keywords: stackalloc, new), use pointers etc.
It’s possible to free memory (for example by something like delete in C++)?
In dotNET we could write unmanaged code, where can I allocate memory dynamically (by
Share
It depends how you allocate memory.
For example, if you allocate memory with AllocHGlobal :
You allocate the array of doubles of a given size.
To free that memory after you have to call FreeHGlobal
There are also other functions for allocating COM task memory, like
AllocCoTaskMem and relative FreeCoTaskMem