- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone figured out if Intel Inspector will get tricked if memory is deallocated through a different pointer than it was originally associated with? For example if I have a array pointer that I allocate space for, and fill, then I point another array pointer to the original pointer, and deallocate the memory by the new pointer? If I try to deallocate the old pointer I get run time errors, if I don't deallocate it the Inspector reports a memory leak. Is this really a leak? Any help is appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, I'm using the Inspector on Fortran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to get a small reproducer?
This example works fine for me (compiled on Windows with Composer XE 2013, 64 bit):
[fortran]
program two_pointer
integer, pointer :: array1(:),array2(:)
integer i
allocate(array1(100))
do i = 1,100
array1(i) = i
end do
array2 => array1
deallocate(array2)
end
[/fortran]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page