View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000045||OpenFOAM||[All Projects] Bug||public||2010-09-22 12:31||2010-10-07 18:03|
|Fixed in Version|
|Summary||0000045: bubbleFoam - phiaPtr and phibPtr not deleted|
|Description||phiaPtr and phibPtr in createPhia.H and createPhib.H are not deleted after use.|
surfaceScalarField phib = *phibPtr;
surfaceScalarField& phib = *phibPtr;
The storage for these fields is deleted at the end of the run along with all other storage allocated during the run.
What is the advantage of the additional complexity and copies of your proposal?
None. It's stupid to make a copy.
It would still be good to delete them just before the program exits. I have a solver derived from it and had a (real) memory leak. The warnings about the phiPtr objects confused me at first.
If I called bubbleFoam using system() from another application, the memory would not be freed when bubbleFoam exits would it? I'm not saying I would do that with bubbleFoam...
> It would still be good to delete them just before the program exits. I have a
> solver derived from it and had a (real) memory leak. The warnings about the
> phiPtr objects confused me at first.
> If I called bubbleFoam using system() from another application, the memory
> would not be freed when bubbleFoam exits would it?
Anyway, I will consider a cleaner option for this kind of initialization.
||Resolved by commit e29ef43c0713557b7f08f33cb48503f34fec23c6|
|2010-09-22 16:11||henry||Assigned To||=> henry|
|2010-09-22 16:11||henry||Status||new => assigned|
|2010-09-22 16:13||henry||Note Added: 0000048|
|2010-09-22 16:13||henry||Status||assigned => feedback|
||Note Added: 0000049|
||Status||feedback => assigned|
|2010-09-22 17:29||henry||Note Added: 0000050|
|2010-09-22 17:48||henry||Note Added: 0000051|
|2010-09-22 17:48||henry||Status||assigned => resolved|
|2010-09-22 17:48||henry||Resolution||open => fixed|
||Tag Attached: Modelling|
||Tag Attached: Solver|