Index: sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 27972c1dfdd57a50946a99914051e1713c997e78)
+++ sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CBinaryHSModel_dealloc(CBinaryHSModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CBinaryHSPSF11Model_dealloc(CBinaryHSPSF11Model* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CCoreShellCylinderModel_dealloc(CCoreShellCylinderModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CCoreShellEllipsoidModel_dealloc(CCoreShellEllipsoidModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CCoreShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CCoreShellModel_dealloc(CCoreShellModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CCylinderModel_dealloc(CCylinderModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CDiamCylFunc_dealloc(CDiamCylFunc* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CDiamEllipFunc_dealloc(CDiamEllipFunc* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CEllipsoidModel_dealloc(CEllipsoidModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CEllipticalCylinderModel_dealloc(CEllipticalCylinderModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CFlexibleCylinderModel_dealloc(CFlexibleCylinderModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CGaussian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CGaussian_dealloc(CGaussian* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CHardsphereStructure_dealloc(CHardsphereStructure* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CHayterMSAStructure_dealloc(CHayterMSAStructure* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CHollowCylinderModel_dealloc(CHollowCylinderModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLamellarFFHGModel_dealloc(CLamellarFFHGModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLamellarModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLamellarModel_dealloc(CLamellarModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLamellarPSHGModel_dealloc(CLamellarPSHGModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLamellarPSModel_dealloc(CLamellarPSModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLogNormal.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLogNormal_dealloc(CLogNormal* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CLorentzian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CLorentzian_dealloc(CLorentzian* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CMultiShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CMultiShellModel_dealloc(CMultiShellModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/COblateModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/COblateModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/COblateModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 COblateModel_dealloc(COblateModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CParallelepipedModel_dealloc(CParallelepipedModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CProlateModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CProlateModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CProlateModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CProlateModel_dealloc(CProlateModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CSchulz.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CSchulz_dealloc(CSchulz* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CSphereModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CSphereModel_dealloc(CSphereModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CSquareWellStructure_dealloc(CSquareWellStructure* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CStackedDisksModel_dealloc(CStackedDisksModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CStickyHSStructure_dealloc(CStickyHSStructure* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CTriaxialEllipsoidModel_dealloc(CTriaxialEllipsoidModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/CVesicleModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 CVesicleModel_dealloc(CVesicleModel* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     
Index: sansmodels/src/sans/models/c_models/classTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_models/classTemplate.txt	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/classTemplate.txt	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
@@ -60,4 +60,8 @@
 [PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
+    Py_DECREF(self->params);
+    Py_DECREF(self->dispersion);
+    Py_DECREF(self->log);
+    delete self->model;
     self->ob_type->tp_free((PyObject*)self);
     [NUMERICAL_DEALLOC]
