Why std::allocators are not that popular? [closed]
Closed 10 years ago.
Does assigning NULL in a GC’ed Environment have similar effects to using free()?
I was just writing a function (in C# in this case) that stored huge amounts of data in a local variable early on in the code, let’s say at 5% of the functions code.
After that point, the data in this memeory are no longer used,
also the following 95% of code have a variable runtime, as part of it depends on external ressources.
My Idea was (inspired by C) to ‘actively free’ that block of memory.
In an evironment with a GC this is mostly just plain impossible.
Does assigning NULL in a GC’ed Environment have similar effects to using free()?
I was just writing a function (in C# in this case) that stored huge amounts of data in a local variable early on in the code, let’s say at 5% of the functions code.
After that point, the data in this memeory are no longer used,
also the following 95% of code have a variable runtime, as part of it depends on external ressources.
My Idea was (inspired by C) to ‘actively free’ that block of memory.
In an evironment with a GC this is mostly just plain impossible.
Big O notation allocate array of N element
In Big O notation, allocate an array of N element is defined by O(1) or O(n) ?
For example in C#, if I allocate an array like this :
Big O notation allocate array of N element
In Big O notation, allocate an array of N element is defined by O(1) or O(n) ?
For example in C#, if I allocate an array like this :
Big O notation allocate array of N element
In Big O notation, allocate an array of N element is defined by O(1) or O(n) ?
For example in C#, if I allocate an array like this :
What could be the best approach to reallocate the memory of dynamically allocated arrays? [closed]
Closed 5 months ago.