View Issue Details

IDProjectCategoryView StatusLast Update
0000375OpenFOAMBugpublic2012-01-03 11:21
Reporteruser38Assigned Touser2 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Summary0000375: bad use of tmp in fixedShearStressFvPatchVectorField.C
Descriptionthere seems to be a bug at line 121 of fixedShearStressFvPatchVectorField.C

  tmp<scalarField> nuEffw = rasModel.nuEff()().boundaryField()[patchI];
should be changed to
  scalarField nuEffw = rasModel.nuEff()().boundaryField()[patchI];

nuEff() is a tmp created by new operation, after this line of code, the nuEff() object should be deleted automatically. If you use a reference of a part of this object, it will use a memory that has been released, which cause a memory leakage.

Am I right?

TagsNo tags attached.

Activities

user2

2012-01-03 11:21

  ~0000891

Thanks for the report. Instead of the field copy, we tend to use tmp manipulations as given by commit:

96fdf4ce6dcd3d511983685009927e2bb67cbbde

Issue History

Date Modified Username Field Change
2011-12-26 15:00 user38 New Issue
2012-01-03 11:21 user2 Note Added: 0000891
2012-01-03 11:21 user2 Status new => resolved
2012-01-03 11:21 user2 Resolution open => fixed
2012-01-03 11:21 user2 Assigned To => user2