In an event/function, if I create a user object local to the script (and
user object is not autoinstantiated), do I have to destroy it, or does
Powerbuilder(6.5/7.0) do that for me at some point in time.
eg:
uo_datastore lds_DataStore
lds_datastore = Create uo_datastore
...
Destroy lds_DataStore (must I do this?)
I'm just having a blonde day, and I've got myself confused!
Gord
regards,
Bill
Gord wrote:
--
Bill Green[TeamSybase]
-----------------------------------------------------------
Good Links to know, good places to go:
News: Sybase Portal is live - Go http://my.sybase.com
Developer stuff on my.sybase.com
Find things like:
-- EAServer 3.6 maintenance release is available
-- PowerBuilder C3 maintenance release available (build 8046)
-- Components, White papers, articles and more
-- Web DataWindow Article Series (Author: Larry Cermak)
-- Jaguar Agent for Web Servers (HTTP access to PB components)
PFC Guide - http://www.pfcguide.com
Power3 - Custom Training - http://www.power3.com
Bill Green @ Power3 - wgr...@power3.com
-----------------------------------------------------------
S.
--
Simon Caldwell
Get Real Systems Ltd
Holtby Manor, Stamford Bridge Road, York, YO19 5LL
Tel 01904 481999 Fax 01904 481666
Visit us at www.getrealsystems.com
Specialists in e-Procurement and supply chain technology
"Bill Green[TeamSybase]" <bill....@teamsybase.com> wrote in message
news:39DCDCB0...@teamsybase.com...
--
This is a FAQ, read Help, then search www.deja.com
pbm_thisusuallydoesnothelp:-))
Philip Salgannik
"Simon Caldwell" <simonDOTcaldwellATgetrealsystemsDOTcom> wrote in message
news:qOcaZF4...@forums.sybase.com...
Bill
Gord wrote in message ...
"Philip Salgannik" <psalg...@softrax.com> wrote in message
news:9$#34P6LA...@forums.sybase.com...
> Where is the contradiction?
>
> --
> This is a FAQ, read Help, then search www.deja.com
>
> pbm_thisusuallydoesnothelp:-))
>
> Philip Salgannik
>
>
> "Simon Caldwell" <simonDOTcaldwellATgetrealsystemsDOTcom> wrote in message
> news:qOcaZF4...@forums.sybase.com...
> > > > Just a bit of confusion I'm hoping someone can clear up.
> > > >
> > > > In an event/function, if I create a user object local to the script
> (and
> > > > user object is not autoinstantiated), do I have to destroy it, or
does
> > > > Powerbuilder(6.5/7.0) do that for me at some point in time.
> > > >
> > > > eg:
> > > >
> > > > uo_datastore lds_DataStore
> > > > lds_datastore = Create uo_datastore
> > > > ...
> > > >
> > > > Destroy lds_DataStore (must I do this?)
> > > >
> > > > I'm just having a blonde day, and I've got myself confused!
> > > >
> > > > Gord
> > >
Simon Caldwell wrote in message ...
--
John De Lello
DelWare Consulting Group
Programming solutions for today's complex problems
http://www.DelWare.com
"Jerry Siegel" <jer...@data-sci.com.NOSPAM> wrote in message
news:II8DSZf...@forums.sybase.com...
"John De Lelllo" <Jo...@DelWare.com> wrote in message
news:5BFABCg...@forums.sybase.com...
"Sybase Forums" <t...@systemsevolution.com> wrote in message
news:qF1tB3g...@forums.sybase.com...
Taking this one step further, does this imply that PB components which
have methods that return ResultSets will constantly leak? Given this
(poorly written) sample:
<--------------------------------
datastore lds_foo
lds_foo = create datastore
lds_foo.dataobject = 'd_foo'
lds_foo.setTransObject( sqlca )
lds_foo.retrieve("somearg")
ResultSet lrs_results
lds_foo.GenerateResultSet( lrs_results )
return lrs_results
<--------------------------------
I can't destroy the datastore before returning the RS, since the RS
maintains a reference to it. Hence, leakage on every single call to
this method? Is the solution to use an instance datastore, relying on
Deactivate to destroy?
Glenn
"Bill Green[TeamSybase]" wrote:
>
> Correct, but the datastore object maintains a reference to it's dataobject (and
> the dataobject to the datastore) so the garbage collector thinks it's still
> active.
>
> Bill
>
> Simon Caldwell wrote:
>
But in the 2-tier world, there is no server to help you, so if you do not clean up,
you will leak.
regards,
Bill