--- a/cmajor++/Llvm/Llvm.Ir/Global.cpp
+++ b/cmajor++/Llvm/Llvm.Ir/Global.cpp
@@ -194,6 +194,7 @@
         return i->second;
     }
     GlobalPtr global = GlobalPtr(new Global(name, type));
+    global->SetOwned();
     globalMap[p] = global;
     globals.push_back(UniqueObjectPtr(global));
     return global;