Closing an object

Discussions related to Visual Prolog
drspro2
VIP Member
Posts: 78
Joined: 28 Apr 2006 12:03

Unread post by drspro2 » 8 Feb 2012 11:03

if you create an object with
Obj = ::new(),

does one has to close the Obj ?

and if so , how?


thankyou

User avatar
Tonton Luc
VIP Member
Posts: 501
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc » 8 Feb 2012 11:13

Hi,

:idea:

Code: Select all

Obj:close(),

User avatar
Thomas Linder Puls
VIP Member
Posts: 1622
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 9 Feb 2012 7:43

I am not sure what you mean by close?

You don't have to "close" objects, but some objects represent external resources like files, ODBC statements, graphical devices, etc and some such external resources may need to be closed or released in some ways.

By the way, you cannot create objects with ::new, you either have to write a class name in front of '::' or remove '::' to mean the class in which you are inside.
Regards Thomas Linder Puls
PDC

drspro2
VIP Member
Posts: 78
Joined: 28 Apr 2006 12:03

Unread post by drspro2 » 9 Feb 2012 9:48

for example in my cgi program

i create an object with

Obj = gmtTime::new(),


so at the end of the cgi program
i do not have to explicitly close it to release memory ?



thnkyou

User avatar
Thomas Linder Puls
VIP Member
Posts: 1622
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 9 Feb 2012 10:38

No
Regards Thomas Linder Puls
PDC

Post Reply