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.

Can a shared component be explicitly destroyed ?

19 posts in General Discussion (old) Last posting was on 2000-03-22 22:07:54.0Z
Basant Gupta Posted on 2000-03-06 20:54:15.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 06 Mar 2000 12:54:15 -0800
From: Basant Gupta <basantg@yahoo.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 11
NNTP-Posting-Host: 207.171.209.94
Message-ID: <347_38C41AF7.E479C10@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27050
Article PK: 157987

Hi,
Can I explicitly destroy a shared component. If so how ?

I have a shared component which stores data from various clients.
Clients communicate with each other via this shared component. Once in
a while when there are no more clients I would like to destroy this
shared component to release any memory held by this compoenent. Any
suggestions as to how I can do this ?

Basant Gupta


Dave Wolf [Sybase] Posted on 2000-03-07 00:33:23.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Mon, 6 Mar 2000 19:33:23 -0500
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: PPPa22-ResaleDialinx8008-4R1010.saturn.bbn.com 4.16.20.177
Message-ID: <347_$CrgQ18h$GA.251@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27023
Article PK: 157964

There's only one instance. It cant take up too much memory can it? I guess
you could call completeWork()

Dave Wolf
Internet Applications Division

"Basant Gupta" <basantg@yahoo.com> wrote in message
news:38C41AF7.E479C10@yahoo.com...
> Hi,
> Can I explicitly destroy a shared component. If so how ?
>
> I have a shared component which stores data from various clients.
> Clients communicate with each other via this shared component. Once in
> a while when there are no more clients I would like to destroy this
> shared component to release any memory held by this compoenent. Any
> suggestions as to how I can do this ?
>
> Basant Gupta
>


Basant Gupta Posted on 2000-03-07 17:18:18.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 07 Mar 2000 09:18:18 -0800
From: Basant Gupta <basantg@yahoo.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 23
NNTP-Posting-Host: 207.171.209.94
Message-ID: <347_38C539DA.8C4A3250@yahoo.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26973
Article PK: 157921

Hi,
My shared component is a stateless component. In anycase completeWork()
would just deactivate it. I need to destroy or reinitialize it.

Basant

"Dave Wolf [Sybase]" wrote:

> There's only one instance. It cant take up too much memory can it? I guess
> you could call completeWork()
>
> Dave Wolf
> Internet Applications Division
>
> "Basant Gupta" <basantg@yahoo.com> wrote in message
> news:38C41AF7.E479C10@yahoo.com...
> > Hi,
> > Can I explicitly destroy a shared component. If so how ?
> >
> > I have a shared component which stores data from various clients.
> > Clients communicate with each other via this shared component. Once in
> > a while when there are no more clients I would like to destroy this
> > shared component to release any memory held by this compoenent. Any
> > suggestions as to how I can do this ?
> >
> > Basant Gupta
> >


Dave Wolf [Sybase] Posted on 2000-03-07 23:36:35.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Tue, 7 Mar 2000 18:36:35 -0500
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: vpn-eme-060.sybase.com 130.214.8.60
Message-ID: <347_hZe5N6Ii$GA.202@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26930
Article PK: 154462

I do not believe you can do this. I would create methods that clear
instance members. Since instance members hold memory, setting them to null
or emptying them out would clear memory.

Dave Wolf
Internet Applications Division

"Basant Gupta" <basantg@yahoo.com> wrote in message
news:38C539DA.8C4A3250@yahoo.com...
> Hi,
> My shared component is a stateless component. In anycase
completeWork()
> would just deactivate it. I need to destroy or reinitialize it.
>
> Basant
>
> "Dave Wolf [Sybase]" wrote:
>
> > There's only one instance. It cant take up too much memory can it? I
guess
> > you could call completeWork()
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > news:38C41AF7.E479C10@yahoo.com...
> > > Hi,
> > > Can I explicitly destroy a shared component. If so how ?
> > >
> > > I have a shared component which stores data from various clients.
> > > Clients communicate with each other via this shared component. Once
in
> > > a while when there are no more clients I would like to destroy this
> > > shared component to release any memory held by this compoenent. Any
> > > suggestions as to how I can do this ?
> > >
> > > Basant Gupta
> > >
>


Edie Harris Posted on 2000-03-09 18:14:25.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Edie Harris" <edie_harris@rsco.com>
From: "Edie Harris" <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Thu, 9 Mar 2000 10:14:25 -0800
Lines: 52
Organization: RSCO
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: user250.rsco.com 206.79.48.250
Message-ID: <347_hfu8GQfi$GA.111@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26770
Article PK: 154438

What do you recommend for "clearing out' a PB datastore? Have tried
Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
ids_name.storage still returns a value larger than zero...

Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
news:hZe5N6Ii$GA.202@forums.sybase.com...
> I do not believe you can do this. I would create methods that clear
> instance members. Since instance members hold memory, setting them to
null
> or emptying them out would clear memory.
>
> Dave Wolf
> Internet Applications Division
>
> "Basant Gupta" <basantg@yahoo.com> wrote in message
> news:38C539DA.8C4A3250@yahoo.com...
> > Hi,
> > My shared component is a stateless component. In anycase
> completeWork()
> > would just deactivate it. I need to destroy or reinitialize it.
> >
> > Basant
> >
> > "Dave Wolf [Sybase]" wrote:
> >
> > > There's only one instance. It cant take up too much memory can it? I
> guess
> > > you could call completeWork()
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > news:38C41AF7.E479C10@yahoo.com...
> > > > Hi,
> > > > Can I explicitly destroy a shared component. If so how ?
> > > >
> > > > I have a shared component which stores data from various
clients.
> > > > Clients communicate with each other via this shared component. Once
> in
> > > > a while when there are no more clients I would like to destroy this
> > > > shared component to release any memory held by this compoenent. Any
> > > > suggestions as to how I can do this ?
> > > >
> > > > Basant Gupta
> > > >
> >
>
>


Dave Wolf [Sybase] Posted on 2000-03-10 01:56:38.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Thu, 9 Mar 2000 20:56:38 -0500
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: PPPa29-ResaleAnnapolis2-1R7132.saturn.bbn.com 4.54.8.90
Message-ID: <347_akDFPcji$GA.201@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26729
Article PK: 157716

reset()?

Dave Wolf
Internet Applications Division

"Edie Harris" <edie_harris@rsco.com> wrote in message
news:hfu8GQfi$GA.111@forums.sybase.com...
> What do you recommend for "clearing out' a PB datastore? Have tried
> Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> ids_name.storage still returns a value larger than zero...
>
> Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> news:hZe5N6Ii$GA.202@forums.sybase.com...
> > I do not believe you can do this. I would create methods that clear
> > instance members. Since instance members hold memory, setting them to
> null
> > or emptying them out would clear memory.
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > news:38C539DA.8C4A3250@yahoo.com...
> > > Hi,
> > > My shared component is a stateless component. In anycase
> > completeWork()
> > > would just deactivate it. I need to destroy or reinitialize it.
> > >
> > > Basant
> > >
> > > "Dave Wolf [Sybase]" wrote:
> > >
> > > > There's only one instance. It cant take up too much memory can it?
I
> > guess
> > > > you could call completeWork()
> > > >
> > > > Dave Wolf
> > > > Internet Applications Division
> > > >
> > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > news:38C41AF7.E479C10@yahoo.com...
> > > > > Hi,
> > > > > Can I explicitly destroy a shared component. If so how ?
> > > > >
> > > > > I have a shared component which stores data from various
> clients.
> > > > > Clients communicate with each other via this shared component.
Once
> > in
> > > > > a while when there are no more clients I would like to destroy
this
> > > > > shared component to release any memory held by this compoenent.
Any
> > > > > suggestions as to how I can do this ?
> > > > >
> > > > > Basant Gupta
> > > > >
> > >
> >
> >
>
>


Edie Harris Posted on 2000-03-10 17:59:08.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Edie Harris" <edie_harris@rsco.com>
From: "Edie Harris" <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Fri, 10 Mar 2000 09:59:08 -0800
Lines: 76
Organization: RSCO
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: user250.rsco.com 206.79.48.250
Message-ID: <347_3D#KJsri$GA.111@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_akDFPcji$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26652
Article PK: 157654

Reset() removes the rows from the datastore OK, but the storage property is
still non-zero. There could be 100s of these critters!

Please refer to my reply to Jim O'Neill. I'd like to DESTROY, and then
re-CREATE the datastore, but the DESTROY hangs the thread.

Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
news:akDFPcji$GA.201@forums.sybase.com...
> reset()?
>
> Dave Wolf
> Internet Applications Division
>
> "Edie Harris" <edie_harris@rsco.com> wrote in message
> news:hfu8GQfi$GA.111@forums.sybase.com...
> > What do you recommend for "clearing out' a PB datastore? Have tried
> > Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> > ids_name.storage still returns a value larger than zero...
> >
> > Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> > news:hZe5N6Ii$GA.202@forums.sybase.com...
> > > I do not believe you can do this. I would create methods that clear
> > > instance members. Since instance members hold memory, setting them to
> > null
> > > or emptying them out would clear memory.
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > news:38C539DA.8C4A3250@yahoo.com...
> > > > Hi,
> > > > My shared component is a stateless component. In anycase
> > > completeWork()
> > > > would just deactivate it. I need to destroy or reinitialize it.
> > > >
> > > > Basant
> > > >
> > > > "Dave Wolf [Sybase]" wrote:
> > > >
> > > > > There's only one instance. It cant take up too much memory can
it?
> I
> > > guess
> > > > > you could call completeWork()
> > > > >
> > > > > Dave Wolf
> > > > > Internet Applications Division
> > > > >
> > > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > > news:38C41AF7.E479C10@yahoo.com...
> > > > > > Hi,
> > > > > > Can I explicitly destroy a shared component. If so how ?
> > > > > >
> > > > > > I have a shared component which stores data from various
> > clients.
> > > > > > Clients communicate with each other via this shared component.
> Once
> > > in
> > > > > > a while when there are no more clients I would like to destroy
> this
> > > > > > shared component to release any memory held by this compoenent.
> Any
> > > > > > suggestions as to how I can do this ?
> > > > > >
> > > > > > Basant Gupta
> > > > > >
> > > >
> > >
> > >
> >
> >
>
>


Evan Ireland Posted on 2000-03-11 23:03:16.0Z
Newsgroups: sybase.public.easerver
Date: Sun, 12 Mar 2000 12:03:16 +1300
From: Evan Ireland <eireland@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Edie Harris <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 75
NNTP-Posting-Host: vpn-eme-013.sybase.com 130.214.8.13
Message-ID: <347_38CAD0B4.71CBC0BE@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_akDFPcji$GA.201@forums.sybase.com> <347_3D#KJsri$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26585
Article PK: 157593


Edie Harris wrote:
>
> Reset() removes the rows from the datastore OK, but the storage property is
> still non-zero. There could be 100s of these critters!
>
> Please refer to my reply to Jim O'Neill. I'd like to DESTROY, and then
> re-CREATE the datastore, but the DESTROY hangs the thread.

Please enable the "Bind Thread" option on your shared component if
it is not already enabled.

> Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> news:akDFPcji$GA.201@forums.sybase.com...
> > reset()?
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > "Edie Harris" <edie_harris@rsco.com> wrote in message
> > news:hfu8GQfi$GA.111@forums.sybase.com...
> > > What do you recommend for "clearing out' a PB datastore? Have tried
> > > Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> > > ids_name.storage still returns a value larger than zero...
> > >
> > > Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> > > news:hZe5N6Ii$GA.202@forums.sybase.com...
> > > > I do not believe you can do this. I would create methods that clear
> > > > instance members. Since instance members hold memory, setting them to
> > > null
> > > > or emptying them out would clear memory.
> > > >
> > > > Dave Wolf
> > > > Internet Applications Division
> > > >
> > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > news:38C539DA.8C4A3250@yahoo.com...
> > > > > Hi,
> > > > > My shared component is a stateless component. In anycase
> > > > completeWork()
> > > > > would just deactivate it. I need to destroy or reinitialize it.
> > > > >
> > > > > Basant
> > > > >
> > > > > "Dave Wolf [Sybase]" wrote:
> > > > >
> > > > > > There's only one instance. It cant take up too much memory can
> it?
> > I
> > > > guess
> > > > > > you could call completeWork()
> > > > > >
> > > > > > Dave Wolf
> > > > > > Internet Applications Division
> > > > > >
> > > > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > > > news:38C41AF7.E479C10@yahoo.com...
> > > > > > > Hi,
> > > > > > > Can I explicitly destroy a shared component. If so how ?
> > > > > > >
> > > > > > > I have a shared component which stores data from various
> > > clients.
> > > > > > > Clients communicate with each other via this shared component.
> > Once
> > > > in
> > > > > > > a while when there are no more clients I would like to destroy
> > this
> > > > > > > shared component to release any memory held by this compoenent.
> > Any
> > > > > > > suggestions as to how I can do this ?
> > > > > > >
> > > > > > > Basant Gupta
> > > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >

--
________________________________________________________________________________

Evan Ireland Sybase EAServer Engineering eireland@sybase.com
Wellington, New Zealand +64 4 934-5856


Edie Harris Posted on 2000-03-22 19:20:23.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Edie Harris" <edie_harris@rsco.com>
From: "Edie Harris" <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Wed, 22 Mar 2000 11:20:23 -0800
Lines: 130
Organization: RSCO
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: user250.rsco.com 206.79.48.250
Message-ID: <347_RWBttRDl$GA.285@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_akDFPcji$GA.201@forums.sybase.com> <347_3D#KJsri$GA.111@forums.sybase.com> <347_38CAD0B4.71CBC0BE@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25902
Article PK: 154357

Sorry it took so long to reply -- I was on Spring Break <G>

we have bind.thread=true and thread.safe=false in the component's props
file.

Could it be something to do with shared component/NVO interaction?

Here's what I explained to Jim re how the component uses an NVO:
============================================
The whole story is :
1) NVO is instantiated by a shared component, reference to it is placed
in an array
2) NVO has lots of instance vars, one of which is a datastore CREATED in
constructor event
3) methods in shared component invoke methods in NVO to retrieve data,
etc.
4) NVO has a method called DestroyCache() which clears all instance vars
and needs to clear the datastore.
5) Shared Component invokes NVO DestroyCache() to try to re-use it
because I ran into problems last summer with explicit destroy (and later
re-create) of the NVO itself....

So, for now we just live with the extra storage used by the NVO's datastore
until the NVO gets re-used for a different dataobject and its retrieve, etc.

But I would like to clean this up...
===============================================================

Evan Ireland <eireland@sybase.com> wrote in message
news:38CAD0B4.71CBC0BE@sybase.com...
> Edie Harris wrote:
> >
> > Reset() removes the rows from the datastore OK, but the storage property
is
> > still non-zero. There could be 100s of these critters!
> >
> > Please refer to my reply to Jim O'Neill. I'd like to DESTROY, and then
> > re-CREATE the datastore, but the DESTROY hangs the thread.
>
> Please enable the "Bind Thread" option on your shared component if
> it is not already enabled.
>
> > Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> > news:akDFPcji$GA.201@forums.sybase.com...
> > > reset()?
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > "Edie Harris" <edie_harris@rsco.com> wrote in message
> > > news:hfu8GQfi$GA.111@forums.sybase.com...
> > > > What do you recommend for "clearing out' a PB datastore? Have tried
> > > > Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> > > > ids_name.storage still returns a value larger than zero...
> > > >
> > > > Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message
> > > > news:hZe5N6Ii$GA.202@forums.sybase.com...
> > > > > I do not believe you can do this. I would create methods that
clear
> > > > > instance members. Since instance members hold memory, setting
them to
> > > > null
> > > > > or emptying them out would clear memory.
> > > > >
> > > > > Dave Wolf
> > > > > Internet Applications Division
> > > > >
> > > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > > news:38C539DA.8C4A3250@yahoo.com...
> > > > > > Hi,
> > > > > > My shared component is a stateless component. In anycase
> > > > > completeWork()
> > > > > > would just deactivate it. I need to destroy or reinitialize it.
> > > > > >
> > > > > > Basant
> > > > > >
> > > > > > "Dave Wolf [Sybase]" wrote:
> > > > > >
> > > > > > > There's only one instance. It cant take up too much memory
can
> > it?
> > > I
> > > > > guess
> > > > > > > you could call completeWork()
> > > > > > >
> > > > > > > Dave Wolf
> > > > > > > Internet Applications Division
> > > > > > >
> > > > > > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > > > > > news:38C41AF7.E479C10@yahoo.com...
> > > > > > > > Hi,
> > > > > > > > Can I explicitly destroy a shared component. If so how
?
> > > > > > > >
> > > > > > > > I have a shared component which stores data from various
> > > > clients.
> > > > > > > > Clients communicate with each other via this shared
component.
> > > Once
> > > > > in
> > > > > > > > a while when there are no more clients I would like to
destroy
> > > this
> > > > > > > > shared component to release any memory held by this
compoenent.
> > > Any
> > > > > > > > suggestions as to how I can do this ?
> > > > > > > >
> > > > > > > > Basant Gupta
> > > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
>
> --
>

____________________________________________________________________________
____
>
> Evan Ireland Sybase EAServer Engineering
eireland@sybase.com
> Wellington, New Zealand +64 4
934-5856


Evan Ireland Posted on 2000-03-22 22:07:54.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 23 Mar 2000 10:07:54 +1200
From: Evan Ireland <eireland@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Edie Harris <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 41
NNTP-Posting-Host: vpn-eme-011.sybase.com 130.214.8.11
Message-ID: <347_38D9443A.5BF4D710@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_akDFPcji$GA.201@forums.sybase.com> <347_3D#KJsri$GA.111@forums.sybase.com> <347_38CAD0B4.71CBC0BE@sybase.com> <347_RWBttRDl$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25875
Article PK: 155912


Edie Harris wrote:
>
> Sorry it took so long to reply -- I was on Spring Break <G>
>
> we have bind.thread=true and thread.safe=false in the component's props
> file.
>
> Could it be something to do with shared component/NVO interaction?
>
> Here's what I explained to Jim re how the component uses an NVO:
> ============================================
> The whole story is :
> 1) NVO is instantiated by a shared component, reference to it is placed
> in an array
> 2) NVO has lots of instance vars, one of which is a datastore CREATED in
> constructor event
> 3) methods in shared component invoke methods in NVO to retrieve data,
> etc.
> 4) NVO has a method called DestroyCache() which clears all instance vars
> and needs to clear the datastore.
> 5) Shared Component invokes NVO DestroyCache() to try to re-use it
> because I ran into problems last summer with explicit destroy (and later
> re-create) of the NVO itself....
>
> So, for now we just live with the extra storage used by the NVO's datastore
> until the NVO gets re-used for a different dataobject and its retrieve, etc.
>
> But I would like to clean this up...

How about using a re-create of the NVO without using an explicit destroy. The
PB garbage collector can then be left to clean up the old NVO, including the
attached DataStore.
________________________________________________________________________________

Evan Ireland Sybase EAServer Engineering eireland@sybase.com
Wellington, New Zealand +64 4 934-5856


Jim O'Neil [Sybase] Posted on 2000-03-10 01:16:14.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 09 Mar 2000 20:16:14 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 11
NNTP-Posting-Host: nomad6-14.sybase.com 157.133.176.14
Message-ID: <347_38C84CDD.B8AEB79B@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26739
Article PK: 157726


Edie Harris wrote:

> What do you recommend for "clearing out' a PB datastore? Have tried
> Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> ids_name.storage still returns a value larger than zero...
>

How about explicity destroying and recreating? or if that's too much overhead,
does SetNull help?

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


Edie Harris Posted on 2000-03-10 17:54:56.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Edie Harris" <edie_harris@rsco.com>
From: "Edie Harris" <edie_harris@rsco.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Fri, 10 Mar 2000 09:54:56 -0800
Lines: 40
Organization: RSCO
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: user250.rsco.com 206.79.48.250
Message-ID: <347_292izpri$GA.251@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_38C84CDD.B8AEB79B@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26653
Article PK: 157655

sorry, I forgot to mention that I tried that and the thread seemed to
'hang". The whole story is :
1) NVO is instantiated by a shared component, reference to it is placed
in an array
2) NVO has lots of instance vars, one of which is a datastore CREATED in
constructor event
3) methods in shared component invoke methods in NVO to retrieve data,
etc.
4) NVO has a method called DestroyCache() which clears all instance vars
and needs to clear the datastore.
5) Shared Component invokes NVO DestroyCache() to try to re-use it
because I ran into problems last summer with explicit destroy (and later
re-create) of the NVO itself....

So, for now we just live with the extra storage used by the NVO's datastore
until the NVO gets re-used for a different dataobject and its retrieve, etc.

But I would like to clean this up...

Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
news:38C84CDD.B8AEB79B@sybase.com...
> Edie Harris wrote:
>
> > What do you recommend for "clearing out' a PB datastore? Have tried
> > Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> > ids_name.storage still returns a value larger than zero...
> >
>
> How about explicity destroying and recreating? or if that's too much
overhead,
> does SetNull help?
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>


Jim O'Neil [Sybase] Posted on 2000-03-10 20:03:00.0Z
Newsgroups: sybase.public.easerver
Date: Fri, 10 Mar 2000 15:03:00 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 44
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38C954F4.4BC5842A@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com> <347_hfu8GQfi$GA.111@forums.sybase.com> <347_38C84CDD.B8AEB79B@sybase.com> <347_292izpri$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26630
Article PK: 157634


Edie Harris wrote:

> sorry, I forgot to mention that I tried that and the thread seemed to
> 'hang". The whole story is :
> 1) NVO is instantiated by a shared component, reference to it is placed
> in an array
> 2) NVO has lots of instance vars, one of which is a datastore CREATED in
> constructor event
> 3) methods in shared component invoke methods in NVO to retrieve data,
> etc.
> 4) NVO has a method called DestroyCache() which clears all instance vars
> and needs to clear the datastore.
> 5) Shared Component invokes NVO DestroyCache() to try to re-use it
> because I ran into problems last summer with explicit destroy (and later
> re-create) of the NVO itself....
>
> So, for now we just live with the extra storage used by the NVO's datastore
> until the NVO gets re-used for a different dataobject and its retrieve, etc.
>
> But I would like to clean this up...
>
> Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
> news:38C84CDD.B8AEB79B@sybase.com...
> > Edie Harris wrote:
> >
> > > What do you recommend for "clearing out' a PB datastore? Have tried
> > > Reset(), and RowsDiscard(), and setting the dataobject to "" -- but
> > > ids_name.storage still returns a value larger than zero...
> > >
> >
> > How about explicity destroying and recreating? or if that's too much
> overhead,
> > does SetNull help?
> >
> > --
> > Jim O'Neil
> > Senior Technical Support Engineer
> > Sybase, Inc
> >
> >

Edie, I don't think that the DESTROY should hang the component, this might be
something you could open a support issue for if you can't live with the memory
not being deallocated.
--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


Basant Gupta Posted on 2000-03-08 16:21:25.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 08:21:25 -0800
From: Basant Gupta <basantg@yahoo.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 39
NNTP-Posting-Host: 207.171.209.94
Message-ID: <347_38C67E05.48E2D41@yahoo.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_hZe5N6Ii$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26886
Article PK: 157848

Thanks for all the replies,
Yup setting the instance variables to null seems like a good idea. I will
use this approach.

Basant

"Dave Wolf [Sybase]" wrote:

> I do not believe you can do this. I would create methods that clear
> instance members. Since instance members hold memory, setting them to null
> or emptying them out would clear memory.
>
> Dave Wolf
> Internet Applications Division
>
> "Basant Gupta" <basantg@yahoo.com> wrote in message
> news:38C539DA.8C4A3250@yahoo.com...
> > Hi,
> > My shared component is a stateless component. In anycase
> completeWork()
> > would just deactivate it. I need to destroy or reinitialize it.
> >
> > Basant
> >
> > "Dave Wolf [Sybase]" wrote:
> >
> > > There's only one instance. It cant take up too much memory can it? I
> guess
> > > you could call completeWork()
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > "Basant Gupta" <basantg@yahoo.com> wrote in message
> > > news:38C41AF7.E479C10@yahoo.com...
> > > > Hi,
> > > > Can I explicitly destroy a shared component. If so how ?
> > > >
> > > > I have a shared component which stores data from various clients.
> > > > Clients communicate with each other via this shared component. Once
> in
> > > > a while when there are no more clients I would like to destroy this
> > > > shared component to release any memory held by this compoenent. Any
> > > > suggestions as to how I can do this ?
> > > >
> > > > Basant Gupta
> > > >
> >


Evan Ireland Posted on 2000-03-07 20:09:44.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 09:09:44 +1300
From: Evan Ireland <eireland@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Basant Gupta <basantg@yahoo.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 15
NNTP-Posting-Host: vpn-eme-038.sybase.com 130.214.8.38
Message-ID: <347_38C56208.49D53FC0@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26957
Article PK: 157903


Basant Gupta wrote:
>
> Hi,
> My shared component is a stateless component. In anycase completeWork()
> would just deactivate it. I need to destroy or reinitialize it.

Shared component instances cannot be destroyed.

So why not just reinitialize the state of the existing shared object instead
of creating a new object.
________________________________________________________________________________

Evan Ireland Sybase EA Server Engineering eireland@sybase.com
Wellington - New Zealand +64 4 934-5856


Basant Gupta Posted on 2000-03-08 16:30:40.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 08:30:40 -0800
From: Basant Gupta <basantg@yahoo.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 20
NNTP-Posting-Host: 207.171.209.94
Message-ID: <347_38C68030.AAFFDA9A@yahoo.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com> <347_38C56208.49D53FC0@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26884
Article PK: 157845

Thanks Evan,
Reinitializing the state of the shared object seems the way to go. I will use
this approach.

Basant Gupta

Evan Ireland wrote:

> Basant Gupta wrote:
> >
> > Hi,
> > My shared component is a stateless component. In anycase completeWork()
> > would just deactivate it. I need to destroy or reinitialize it.
>
> Shared component instances cannot be destroyed.
>
> So why not just reinitialize the state of the existing shared object instead
> of creating a new object.
> ________________________________________________________________________________
>
> Evan Ireland Sybase EA Server Engineering eireland@sybase.com
> Wellington - New Zealand +64 4 934-5856


Evan Ireland Posted on 2000-03-07 20:09:39.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 09:09:39 +1300
From: Evan Ireland <eireland@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Basant Gupta <basantg@yahoo.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 16
NNTP-Posting-Host: vpn-eme-038.sybase.com 130.214.8.38
Message-ID: <347_38C56203.D713CE4E@sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_$CrgQ18h$GA.251@forums.sybase.com> <347_38C539DA.8C4A3250@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26958
Article PK: 157906


Basant Gupta wrote:
>
> Hi,
> My shared component is a stateless component. In anycase completeWork()
> would just deactivate it. I need to destroy or reinitialize it.

Shared component instances cannot be destroyed.

So why not just reinitialize the state of the existing shared object instead
of creating a new object.

class MySharedComp
{
}
________________________________________________________________________________

Evan Ireland Sybase EA Server Engineering eireland@sybase.com
Wellington - New Zealand +64 4 934-5856


JagUser Posted on 2000-03-06 23:54:48.0Z
Newsgroups: sybase.public.easerver
From: "JagUser" <jaguser@hotmail.com>
Subject: Re: Can a shared component be explicitly destroyed ?
Date: Mon, 6 Mar 2000 15:54:48 -0800
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: vpn-eme-038.sybase.com 130.214.8.38
Message-ID: <347_WmaWjg8h$GA.285@forums.sybase.com>
References: <347_38C41AF7.E479C10@yahoo.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27032
Article PK: 157970

When you deploy the shared component , deploy it as "Does not support
instance pooling". It then triggers the CanBePooled event after each client
use.

In the canbepooled event (mapped to pbm_component_canbepooled), return 0
when you want the object destroyed.

-JagUser.

"Basant Gupta" <basantg@yahoo.com> wrote in message
news:38C41AF7.E479C10@yahoo.com...
> Hi,
> Can I explicitly destroy a shared component. If so how ?
>
> I have a shared component which stores data from various clients.
> Clients communicate with each other via this shared component. Once in
> a while when there are no more clients I would like to destroy this
> shared component to release any memory held by this compoenent. Any
> suggestions as to how I can do this ?
>
> Basant Gupta
>


Basant Gupta Posted on 2000-03-07 17:15:33.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 07 Mar 2000 09:15:33 -0800
From: Basant Gupta <basantg@yahoo.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Can a shared component be explicitly destroyed ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 28
NNTP-Posting-Host: 207.171.209.94
Message-ID: <347_38C53935.2C91833B@yahoo.com>
References: <347_38C41AF7.E479C10@yahoo.com> <347_WmaWjg8h$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26974
Article PK: 157919

I'm using PowerBuilder and when I deploy a shared component, it does not give
me the option to uncheck "instance pooling". I uncheck instance pooling in
Jaguar Manager but the "canbepooled" event does not get called.

Basant

JagUser wrote:

> When you deploy the shared component , deploy it as "Does not support
> instance pooling". It then triggers the CanBePooled event after each client
> use.
>
> In the canbepooled event (mapped to pbm_component_canbepooled), return 0
> when you want the object destroyed.
>
> -JagUser.
>
> "Basant Gupta" <basantg@yahoo.com> wrote in message
> news:38C41AF7.E479C10@yahoo.com...
> > Hi,
> > Can I explicitly destroy a shared component. If so how ?
> >
> > I have a shared component which stores data from various clients.
> > Clients communicate with each other via this shared component. Once in
> > a while when there are no more clients I would like to destroy this
> > shared component to release any memory held by this compoenent. Any
> > suggestions as to how I can do this ?
> >
> > Basant Gupta
> >