diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 8ed0305eb7d825585f814ec5e4c2c07514f97be8..5964e115caaa7165be2aefe64d3e5e761ad55cc9 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -96,6 +96,9 @@ GModel::~GModel()
 #if defined(HAVE_MESH)
   delete _fields;
 #endif
+
+  if(_factory) 
+    delete _factory;
 }
 
 GModel *GModel::current(int index)