- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
A point of clarification. We have a simulator that we sometimes convert to a MATLAB MEX file. When the simulator returns to MATLAB, it does not deallocate the allocated arrays because the program does not actually terminate. This has forced us to write termination routines that deallocate everything explicitly. Stupid MATLAB... ;-)
Marshall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marshall, your situation seems a bit different from what mattsdad asked about.
I assume that your simulator is a collection of Fortran procedures that you call from MATLAB - are they in a DLL? If allocatable arrays are declared local to a routine (perhaps the entry point to your simulator) and not in a module, then they will be deallocated when that routine exits. Otherwise, you are correct in saying that they need to be deallocated explicitly. Or you can check on the next entry to see if they are already allocated, and if so, deallocate them first.

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