summaryrefslogtreecommitdiff
path: root/src/mir/mir_ptr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/mir_ptr.cpp')
-rw-r--r--src/mir/mir_ptr.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mir/mir_ptr.cpp b/src/mir/mir_ptr.cpp
index a31e12ab..f7d08ac9 100644
--- a/src/mir/mir_ptr.cpp
+++ b/src/mir/mir_ptr.cpp
@@ -1,9 +1,18 @@
/*
+ * MRustC - Rust Compiler
+ * - By John Hodge (Mutabah/thePowersGang)
+ *
+ * mir/mir_ptr.cpp
+ * - Destructor for MIR function pointers (cold path code)
*/
#include "mir_ptr.hpp"
+#include "mir.hpp"
::MIR::FunctionPointer::~FunctionPointer()
{
+ if( this->ptr ) {
+ delete this->ptr, this->ptr = nullptr;
+ }
}