Hi Robert,

The following two developer list postings explain how garbage collection works in ULC.
- http://lists.canoo.com/mailman/private/ulc-developer/2006/003955.html
- http://lists.canoo.com/mailman/private/ulc-developer/2006/004040.html

To make it short: the client-side garbage collection relies on the server-side garbage collection. Therefore if the server-side garbage collection cannot collect the proxies, the client-side garbage collector can never free any objects. There are two reasons why the server-side garbage collector cannot collect the proxies:
- there is a memory leak in your application
- the garbage collector does not run

First you should make sure (with help of a profiler) that you don't have a memory leak in your application.

If you don't have a memory leak in your application then you can do one of the following:
- Increase the max heap size on the client
=> In case of a JNLP application you can configure the max heap size in the JNLP file: <j2se version="1.4.2+" max-heap-size="128m"/> => In case of an Applet application it is more difficult as you have to change a file on the client machine: "<profile>Application Data\Sun\Java\Deployment\deployment.properties"
- Do not create to many new proxies in your application
 => reuse proxies, e.g. ULCButtons, ULCLabels
 => reuse whole windows
- Regularly force a server-side garbage collector run from your application: System.gc(). However I look at this as "bad style" and it is not sure that the garbage collector really runs as System.gc() only "...suggests that the Java Virtual Machine expend effort toward recycling unused objects..."


Regards Dany

PS: There is also a corresponding issue in JIRA: http://www.canoo.com/jira/browse/UBA-6919. Could you please vote for this issue? Thanx! Votes give us feedback what to tackle for the next releases. To be able to vote you need to have a (free) JIRA account.


[EMAIL PROTECTED] wrote:
Hi,

i would loke to know if anybody has some expireiences with memory
problems of an ulc-client. Could anyone give some information or hints
about the best gc parameters to use with ulc components? Has anyone
informatzion about using some methods on the server/client side of the
ulc comps to give them free to gc? I see in the gc log that the use heap
is getting more and more and is not beeing freed. After a while the
client has to give up with an out of memory on the client side.

Do O have to set the comps explicitely to null on the server side? When
are the client comps are free to get collected by the vm gc?

bets regards,

Robert
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer


_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to