[Rsiena-commits] r201 - in pkg: RSiena RSiena/man RSienaTest RSienaTest/R RSienaTest/man RSienaTest/src/model RSienaTest/src/model/variables
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 8 12:22:04 CET 2012
Author: ripleyrm
Date: 2012-02-08 12:22:03 +0100 (Wed, 08 Feb 2012)
New Revision: 201
Modified:
pkg/RSiena/DESCRIPTION
pkg/RSiena/changeLog
pkg/RSiena/man/RSiena-package.Rd
pkg/RSienaTest/DESCRIPTION
pkg/RSienaTest/R/sienatable.r
pkg/RSienaTest/changeLog
pkg/RSienaTest/man/RSiena-package.Rd
pkg/RSienaTest/src/model/StatisticCalculator.cpp
pkg/RSienaTest/src/model/variables/DependentVariable.cpp
pkg/RSienaTest/src/model/variables/NetworkVariable.cpp
Log:
Fix memory leaks in settings model.
Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSiena/DESCRIPTION 2012-02-08 11:22:03 UTC (rev 201)
@@ -1,8 +1,8 @@
Package: RSiena
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.200
-Date: 2012-02-07
+Version: 1.0.12.201
+Date: 2012-02-08
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSiena/changeLog 2012-02-08 11:22:03 UTC (rev 201)
@@ -1,3 +1,11 @@
+2012-02-08 R-forge revision 201 (RSienaTest only)
+
+ * R/sienatable.r: added property eol-style=native.
+ * src/model/StatisticCalculator.cpp,
+ src/model/variables/DependentVariable.cpp,
+ src/model/variables/NetworkVariable.cpp: fix some memory leaks in
+ settings model.
+
2012-02-07 R-forge revision 200
* src/model/variables/DependentVariable.cpp: removing
Modified: pkg/RSiena/man/RSiena-package.Rd
===================================================================
--- pkg/RSiena/man/RSiena-package.Rd 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSiena/man/RSiena-package.Rd 2012-02-08 11:22:03 UTC (rev 201)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.200\cr
-Date: \tab 2012-02-07\cr
+Version: \tab 1.0.12.201\cr
+Date: \tab 2012-02-08\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/DESCRIPTION 2012-02-08 11:22:03 UTC (rev 201)
@@ -1,8 +1,8 @@
Package: RSienaTest
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.200
-Date: 2012-02-07
+Version: 1.0.12.201
+Date: 2012-02-08
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Property changes on: pkg/RSienaTest/R/sienatable.r
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: pkg/RSienaTest/changeLog
===================================================================
--- pkg/RSienaTest/changeLog 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/changeLog 2012-02-08 11:22:03 UTC (rev 201)
@@ -1,3 +1,11 @@
+2012-02-08 R-forge revision 201 (RSienaTest only)
+
+ * R/sienatable.r: added property eol-style=native.
+ * src/model/StatisticCalculator.cpp,
+ src/model/variables/DependentVariable.cpp,
+ src/model/variables/NetworkVariable.cpp: fix some memory leaks in
+ settings model.
+
2012-02-07 R-forge revision 200
* src/model/variables/DependentVariable.cpp: removing
Modified: pkg/RSienaTest/man/RSiena-package.Rd
===================================================================
--- pkg/RSienaTest/man/RSiena-package.Rd 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/man/RSiena-package.Rd 2012-02-08 11:22:03 UTC (rev 201)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.200\cr
-Date: \tab 2012-02-07\cr
+Version: \tab 1.0.12.201\cr
+Date: \tab 2012-02-08\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSienaTest/src/model/StatisticCalculator.cpp
===================================================================
--- pkg/RSienaTest/src/model/StatisticCalculator.cpp 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/src/model/StatisticCalculator.cpp 2012-02-08 11:22:03 UTC (rev 201)
@@ -88,9 +88,15 @@
while (!this->lsettingDistances.empty())
{
- int * array = this->lsettingDistances.begin()->second.begin()->second;
+ while (!(this->lsettingDistances.begin())->second.empty())
+ {
+ int * array =
+ this->lsettingDistances.begin()->second.begin()->second;
+ this->lsettingDistances.begin()->second.erase(
+ this->lsettingDistances.begin()->second.begin());
+ delete[] array;
+ }
this->lsettingDistances.erase(this->lsettingDistances.begin());
- delete[] array;
}
// The state just stores the values, but does not own them. It means that
// the destructor of the state won't deallocate the memory, and we must
@@ -737,6 +743,7 @@
}
}
}
+ delete settingNetwork;
}
// for each covariate-defined setting, calculate
// setting*difference network and sum.
Modified: pkg/RSienaTest/src/model/variables/DependentVariable.cpp
===================================================================
--- pkg/RSienaTest/src/model/variables/DependentVariable.cpp 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/src/model/variables/DependentVariable.cpp 2012-02-08 11:22:03 UTC (rev 201)
@@ -395,6 +395,7 @@
delete[] this->lrate;
delete[] this->lcovariateRates;
delete[] this->lsettingRates;
+ delete[] this->lsettingProbs;
// Delete the structural rate effects.
deallocateVector(this->lstructuralRateEffects);
@@ -595,7 +596,7 @@
this->lvalidRates = true;
}
-
+
}
Modified: pkg/RSienaTest/src/model/variables/NetworkVariable.cpp
===================================================================
--- pkg/RSienaTest/src/model/variables/NetworkVariable.cpp 2012-02-07 18:22:39 UTC (rev 200)
+++ pkg/RSienaTest/src/model/variables/NetworkVariable.cpp 2012-02-08 11:22:03 UTC (rev 201)
@@ -127,8 +127,8 @@
delete[] this->lactiveStructuralTieCount;
delete[] this->lpermitted;
delete[] this->lprobabilities;
+ delete this->lsetting;
-
// Delete arrays of contributions
int numberOfAlters;
if (this->oneModeNetwork())
@@ -990,6 +990,7 @@
// TODO: correct this->lsetting for primary setting
if (this->stepType() == 1)
{
+ delete this->lsetting;
this->lsetting = primarySetting(this->pNetwork(), this->lego);
}
this->preprocessEgo(this->lego);
More information about the Rsiena-commits
mailing list