View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000045 | OpenFOAM | Bug | public | 2010-09-22 12:31 | 2010-10-07 18:03 |
Reporter | Assigned To | henry | |||
Priority | low | Severity | trivial | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Fedora | OS Version | 13 |
Summary | 0000045: bubbleFoam - phiaPtr and phibPtr not deleted | ||||
Description | phiaPtr and phibPtr in createPhia.H and createPhib.H are not deleted after use. Suggest maybe: surfaceScalarField phib = *phibPtr; delete phibPtr; instead of surfaceScalarField& phib = *phibPtr; | ||||
Tags | Modelling, Solver | ||||
|
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. Fair comment. > If I called bubbleFoam using system() from another application, the memory > would not be freed when bubbleFoam exits would it? It should. Anyway, I will consider a cleaner option for this kind of initialization. |
|
Resolved by commit e29ef43c0713557b7f08f33cb48503f34fec23c6 |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-09-22 12:31 |
|
New Issue | |
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 |
2010-09-22 16:57 |
|
Note Added: 0000049 | |
2010-09-22 16:57 |
|
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 |
2010-10-07 18:03 |
|
Tag Attached: Modelling | |
2010-10-07 18:03 |
|
Tag Attached: Solver |