- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a memory leak. See attached example, which is an adapted portion of a much larger code.
This code (and the rest of the application) was doing everything with pointers. Over the past few months I have been replacing them all with allocatables, on the assumption that memory leaks are not possible with allocatables. ...Well clearly I was mistaken on that, so what am I doing wrong?
The leak occurs in copy_branch_plot_results, when it calls construct_branch_plot_results. In its original form with pointers, the code was a lot busier, with explicit tests all over to de-allocate the pointers where necessarry. I assumed this was not required with allocatables, so removed most of it, and was dismayed to find that my changes introduced leaks.
Qolin
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm - could have sworn I saw it say 0. But I see a non-zero value now. Will look closer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, any advance on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, finally got this sorted.
qolin, your original issue is one we're already working on - we found that it requires a static allocatable and a character component with a constant length to see. The compiled code is trying to deallocate the component but thinks it is already deallocated.
Ian's program shows a different problem, though there may be some relation. It has been escalated as DPD200253948.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
Please can I have the issue ID of this "one we're already working on " ?
Qolin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DPD200253435
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DPD200253435 has been fixed for a release later this year. DPD200253948 is still being worked.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »