Re: Fortran and .NET (C#)
- From: Brooks Moses <bmoses-nospam@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 14:03:49 -0700
apm wrote:
Both Fortran pointers and allocatable arrays allow dynamic allocation. It is the dynamic allocation that can lead to memory leaks.
But it's not. Fortran allocatable arrays, unlike Fortran pointers, cannot have memory leaks.
In general, dynamic allocation does not lead to memory leaks. What leads to memory leaks (or to the need for garbage collection mechanisms) is the ability to dereference a pointer without necessarily deallocating the associated memory.
This is a crucial difference between Fortran and many other languages: Fortran offers options for dynamic memory allocation that do not involve dereferencable pointers, and thus do not have memory leaks.
- Brooks
-- The "bmoses-nospam" address is valid; no unmunging needed. .
- References:
- Fortran and .NET (C#)
- From: apm
- Re: Fortran and .NET (C#)
- From: Richard Maine
- Re: Fortran and .NET (C#)
- From: apm
- Re: Fortran and .NET (C#)
- From: Richard E Maine
- Re: Fortran and .NET (C#)
- From: apm
- Fortran and .NET (C#)
- Prev by Date: Re: Fortran and .NET (C#)
- Next by Date: Re: Fortran and .NET (C#)
- Previous by thread: Re: Fortran and .NET (C#)
- Next by thread: Re: Fortran and .NET (C#)
- Index(es):
Relevant Pages
|