Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DESTROY – PB Docs 2019 – PowerBuilder Library

DESTROY – PB Docs 2019

DESTROY

Description

Eliminates an object instance that was created with the
CREATE statement. After a DESTROY statement, properties of the deleted
object instance can no longer be referenced.

Syntax

Parameter

Description

objectvariable

A variable whose datatype is a PowerBuilder
object

Usage

When you are finished with an object that you created, you can call
DESTROY to release its memory. However, you should call DESTROY only if
you are sure that the object is not referenced by any other object.
PowerBuilder’s garbage collection mechanism maintains a count of
references to each object and destroys unreferenced objects
automatically.

For more information about garbage collection, see Garbage collection.

All objects are destroyed automatically when your application
terminates.

Examples

Example 1

The following statement destroys the transaction object DBTrans that
was created with a CREATE statement:

Example 2

This example creates an OLEStorage variable istg_prod_pic in a
window’s Open event. When the window is closed, the Close event script
destroys the object. The variable’s declaration is:

The window’s Open event creates an object instance and opens an OLE
storage file:

The window’s Close event destroys istg_prod_pic:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x