Sybase Business Intelligence Solutions - Database Management, Data Warehousing Software, Mobile Enterprise Applications and Messaging
Sybase Brand Color Bar
delete

Search for    in all of Sybase.com
view all search results right arrow
  blank
 
 
 
 
 
 
 
 
 
 
Support > Technical Documents > Document Types > FAQ > FAQ about GarbageCollection in PB

FAQ about GarbageCollection in PB

The following is a summary of frequently asked questions about GarbageCollection
 
RSS Feed
 
 
 
1.) When exactly does the automatic garbage collection take place ?
Garbage collection occurs when the user is not running any code. For example, in a window when you click a button,
the VM runs the clicked event, when the invocation returns, the vm runs garbage collection. The only other time it happens
is when you call the function of course.

2.) Is it possible to run into problems when calling GarbageCollect() explicitly ?
If someone thinks they have found a bug then they should certainly submit it as a p1 to our Support
Organization. It is possible that bugs could exist when calling gc since there is no way we could test
every timing situation of the invocation of gc.This is the reason for having an explicit time for gc to run.
That has been very well tested.

3.) Are there known Problems with GarbageCollect() ?
When calling the GarbageCollect() function in the constructor event of a non visual
userobject the function destroys objects that are referenced.
Workaround: Create a user defined event , call the GarbageCollect() in the user event and finally post
the user event in the constructor event of the nvo.

4.) Is it possible to switch off garbage collection at all ?
No, it is not possible. It's not advisable. If you turn it off, memory never goes away.
You can effectively do that by setting the timeout to a huge number of seconds using the
GarbageCollectSetTimeLimit () function.
But again, memory for the groups or stale objects will NEVER go away unless you call gc.


 

DOCUMENT ATTRIBUTES
Last Revised: Jul 14, 2004
Product: PowerBuilder
Hardware Platform: Windows x86
Technical Topics: Application Development
  
Business or Technical: Technical
Content Id: 47891
Infotype: FAQ - Technical
 
 
 

© Copyright 2014, Sybase Inc. - v 7.6 Home / Contact Us / Help / Jobs / Legal / Privacy / Code of Ethics