Thursday 6 June 2019

memory management - C# - Do I need to worry about if data is stored in the Stack or Heap?

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++

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...