Board index » delphi » Freeing Resources

Freeing Resources

What kind resources need to be specifically released  in my code?

This question is very general, but I am specifically interested if I need to
be explicitly freeing variables declared in the var section of a proceedure.

var i:integer;    apparently takes care of itself.

What about
var myArray:Array[1..100] of Char;    and so forth?

 

Re:Freeing Resources


In general, you only need to free resources that are creating with
code such as objects or memory allocation. Most "normal" variable
types take care of themselves.

Woody

Quote
Kelley Bonawitz wrote in message <74p11h$e...@forums.borland.com>...
>What kind resources need to be specifically released  in my code?

>This question is very general, but I am specifically interested if I
need to
>be explicitly freeing variables declared in the var section of a
proceedure.

>var i:integer;    apparently takes care of itself.

>What about
>var myArray:Array[1..100] of Char;    and so forth?

Re:Freeing Resources


You do not need to free variables.  If you create an instance of an object
or call any of the memory allocation functions you need to ensure that you
free the memory.

Bill

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Other Threads