Add a destructor for sos::GCHeap (dotnet/coreclr#24072)
authorOmair Majid <omajid@redhat.com>
Thu, 18 Apr 2019 17:36:25 +0000 (13:36 -0400)
committerMike McLaughlin <mikem@microsoft.com>
Thu, 18 Apr 2019 17:36:25 +0000 (10:36 -0700)
commit2d250a1bbcc1f3d599aafa9e323f1eb5781af7d9
tree3121e5c5ed435b87987d9eedc9163178369a01de
parentba4dd908149f5dfb3989cb599931e11e302007c2
Add a destructor for sos::GCHeap (dotnet/coreclr#24072)

The constructor allocates memory via new[]. It should be freed up via
delete[] by a destructor to avoid a memory leak.

Commit migrated from https://github.com/dotnet/coreclr/commit/12d7055fe427c6ab4d8c04d28a9f6a35ade6815c
src/coreclr/src/ToolBox/SOS/Strike/sos.cpp
src/coreclr/src/ToolBox/SOS/Strike/sos.h