Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Should I do release the memory when end PB Application ?

3 posts in Objects Last posting was on 2002-06-10 14:58:34.0Z
steven Posted on 2002-06-09 21:23:07.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "steven" <stvhui@yahoo.com>
Subject: Should I do release the memory when end PB Application ?
Date: Sun, 9 Jun 2002 14:23:07 -0700
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
NNTP-Posting-Host: 61.5.20.24
Message-ID: <364_#AfSw84DCHA.289@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1202
Article PK: 713765

Hello to you,
I'm uisng pb8

Should I do release the memory when end PB Application ?
What will going If I ended the application without using "disconnect using
sqlca" statement ?
How to checking, if the running application is "in exe mode" or "in
development mode" ?

Please advice
steven


Arnoud Oortwijk Posted on 2002-06-10 14:58:34.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Arnoud Oortwijk" <aoortwijk@tangram.nl>
Subject: Re: Should I do release the memory when end PB Application ?
Date: Mon, 10 Jun 2002 16:58:34 +0200
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: tangram.nl 213.84.194.121
Message-ID: <364_MopiSCJECHA.201@forums.sybase.com>
References: <364_#AfSw84DCHA.289@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1196
Article PK: 713759

All non visual objects (NVOs) you create you don't have to destroy. The
powerbuilder garbage collector will take care of that as soons as the object
goes out of scope. But besure that you don't lease any reference to the
object, thus avoiding it to go out of scope ever. When the application
terminates, PB will destroy objects automatically (take a look a the PB help
==> destroy and in the HTML books ==> application techniques and look for
garbage collection.)

For all visual objects you create dynamically (OpenUserObject() ) you must
explicitly destory them (closeUserObject() ) failing to do so will cause you
app to become unstable.

All database connections you open, you should always close. Failing to do so
might cause a db connection to remain open on the server, or might cause an
undesired commit or rollback, depending on the 'commitOnDisconnect' option
in you DBparm (if it's not in there, it defaults to 'yes' )

HTH.

Arnoud

Url: http://www.gloriant.be


"steven" <stvhui@yahoo.com> schreef in bericht
news:#AfSw84DCHA.289@forums.sybase.com...

> Hello to you,
> I'm uisng pb8
>
> Should I do release the memory when end PB Application ?
> What will going If I ended the application without using "disconnect using
> sqlca" statement ?
> How to checking, if the running application is "in exe mode" or "in
> development mode" ?
>
> Please advice
> steven
>
>


Chris Keating Posted on 2002-06-10 02:17:00.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Chris Keating" <fight_spam_keating@ianywhere.com>
Subject: Re: Should I do release the memory when end PB Application ?
Date: Sun, 9 Jun 2002 22:17:00 -0400
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 158.159.8.37
Message-ID: <364_1QmlsG8DCHA.289@forums.sybase.com>
References: <364_#AfSw84DCHA.289@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1197
Article PK: 713762

It is good programming practive that any memory you allocate should be
freed. All creates should be mapped with destroys in PB for example.

If you fail to disconnect, it is possible to leave orphaned connections in
your database. Consult your database documentation to determine the impact
of orphaned connections.

Handle( ) will return 0 if running from development. It will return a
positive value running as a EXE.

/ck

"steven" <stvhui@yahoo.com> wrote in message
news:#AfSw84DCHA.289@forums.sybase.com...
> Hello to you,
> I'm uisng pb8
>
> Should I do release the memory when end PB Application ?
> What will going If I ended the application without using "disconnect using
> sqlca" statement ?
> How to checking, if the running application is "in exe mode" or "in
> development mode" ?
>
> Please advice
> steven
>
>