Languages

Fsharp
ActionScript
xBase
Clean
GPSS
PureBasic
Sieve
Erlang
JOVIAL
Mercury
Linda
DataFlex
PostScript
FoxPro2
VFP
Cobol
Prolog
Jython
Awk
VisualBasic
JavaScript
Matlab
ASP
Haskell
Csharp
D
Smalltalk
Nemerle
Pixilang
Java
SQL
Python
ObjectPascal
Ruby
Perl
Pascal
Assembler
PHP
C
Functions  Add function  Users  Registration  Enter   About  ASCII Table  Our helpers

Dispose in Pascal

Dispose procedure
----------------------------------------------------------------
Declaration:
procedure Dispose ( var P : Pointer [, Destructor] );

Example:
type
PString = ^String;
var
S : PString;
...
New( S );
S^:='Goodbye World!'';
Dispose (S);

Purpose:
Deallocates the dynamic memory allocation used by the item or object
pointed to by parameter variable P. When disposing of objects (see chapter 5,
"Object Oriented Programming"), an optional second parameter may specify the
name of the destructor method for the object pointed to by P. When used in
this form, Dispose first calls the destructor method of the object prior to
deallocating the the memory pointed to by P.

Important!
After calling Dispose, the value of P is no longer valid. A commom
programming error is to continue using a pointer after it has been deallocated.
Because the pointer may still point to the original location in memory where
the object had been allocated and since that memory may not be immediately
claimed for use by another entity, this will sometimes work temporarily.
However, to do so is a serious programming error and may cause the program to
crash! Don't do it!
When calling Dispose, P must be a valid pointer. If P does not point to
the memory used by the heap system, Dispose will issue a run-time error and
stop execution of the program.
See FreeMem, GetMem, Mark, New, Release
Add by Pancho
You can edit it here
Adding comments is available only for registered users.

Latest "Green" Packing Material? Mushrooms!

EcoCradle packaging material is composed of agricultural byproducts bound by fungal roots.

A new packing material that grows itself is now appearing in shipped products across the country.

The composite of inedible agricultural waste and mushroom roots is called Mycobond™, and its manufacture requires just one eighth the energy and one tenth the carbon dioxide of traditional foam packing material.

And unlike most foam substitutes, when no longer useful, it makes great compost in the garden.

The technology was the brainchild of two former Rensselaer ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117385&WT.mc_id=USNSF_51&WT.mc_ev=click


This is an NSF News item.

PycckaR
BepcuR


Articles
Articles


Library
Library


Downloads
Downloads

Google Chrome Golf 6
 © Internet, books, teachers and Rudevich Alexander brains.