'Do I need to worry about if data is stored in the Stack or Heap in .NET? [duplicate]
I've gotten used to the memory management of C++ and having to consider if data should be stored in the Stack or Heap though coming back to C#, I'm a little confused on if this should really be a concern anymore.
I'm aware that C# uses a Garbage Collector but does that mean I still need to allocate data to either the Stack or Heap? I mainly ask this considering I'm using the new keyword a lot more then I would in C++
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|