[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference star::wizards

Title: "ASK THE WIZARDS"
Moderator:QUARK::LIONEL
Created:Mon Oct 30 1995
Last Modified:Mon May 12 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1857
Total number of notes:3728

1670.0. "Open: more code to avoid memory leaks?" by STAR::JKEENAN () Thu Mar 13 1997 16:10

Return-Path: "VMS001::WWW"@vms001.das-x.dec.com
Received: by vmsmkt.zko.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Thu, 13 Mar 1997 10:15:56 -0500
Received: from vms001 by mail12.digital.com (8.7.5/UNX 1.5/1.0/WV)
	id KAA17625; Thu, 13 Mar 1997 10:13:30 -0500 (EST)
Date: Thu, 13 Mar 1997 10:15:31 -0500
Message-Id: <[email protected]>
From: "VMS001::WWW"@vms001.das-x.dec.com (13-Mar-1997 1015)
To: [email protected], [email protected], [email protected]
Subject: Ask the Wizard: '[email protected]'
X-VMS-To: [email protected]

Remote Host: (null)
Browser Type: Mozilla/3.0Gold (WinNT; I)
Remote Info: <null>
Name: Ralf Gaertner
Email Address: [email protected]
CPU Architecture: VAX and Alpha
Version: v 6.2
Questions: 

I am going to add a VMS-like interface to a Unix based
C program. The original source gets the arguments via
  main (argc, argv)
I have added a call to an external routine written in
Pascal which uses the CLI interface to define qualifiers
and to recieve them upon start. The Pascal routine
reserves some memory by the standard procedure NEW and
passes the addresses back to the C code. So my qustion
is: does the allocated memory gets released when the C
program terminates or must I add some code to do it by
myself to avoid memory leaks ?

Ralf Gaertner
T.RTitleUserPersonal
Name
DateLines
1670.1Having The Program Clean Up Is Better, But...XDELTA::HOFFMANSteve, OpenVMS EngineeringFri Mar 14 1997 18:057
   When a program image exits, all memory allocated to the image is
   automatically freed as part of the "image rundown".

   The "image rundown" and "process rundown" support typically cleans
   up the various typical constructs that might have been left by an
   image or by a process.