Dear Anton, I did some investigations on your problem. Thanks to your great sample program, it was relatively easy for me to analyze the behaviour of ULC in this context.
As a quick answer upfront: With respect to GC management, ULC treats ULCTables in exactly the same way as ULCButtons. I could validate this by profiling your sample Application with YourKit. In general, ULC's remote memory management works about as follows: On the client side, UIProxy objects (and associated Swing components) are kept Map with IDs as keys to identify the UIProxy objects. (The related references are strong.) On the server a similar map exists for ULCProxy objects but the related references are weak (with only a few exceptions). When a ULCButton or a ULCTable is only (!) referenced from the map on the server it becomes collectable. When the garbage collector collects it, ULC sends the ID of the collected ULCProxy object as part of the next roundtrip to the client. On the client-side ULC removes the UIProxy object with just this ID from the client side map and so, the related UIProxy object eventually become collectable on the client side. However, in order to have it be collected, the client-side garbage collector must run. To keep it short: the following sequence of events must happen until a component is eventually collected on the client side. 1) The corresponding ULCProxy object is not referenced anymore on the server (except for the server-side map) 2) The server-side gc runs. 3) A round trip occurs so that the information about the IDs of released server-side objects is propagated to the client such that UIProxys get removed from the client-side map. 4) The client-side gc runs. To test your program I added some logging information at the related server-side ULC code. Here is the result for a click scenario with respect to you app: -> Click on Table button: Registering ulctable: [EMAIL PROTECTED] with oid 1118 -> Click on "Exit" button in table tab: active tab: -1 -> Enforcing GC on server -> Click on "Round Trip" button Removing Callables: 1120 1121 1123 1129 1124 1118 1130 1125 1131 1122 1113 1114 1116 1126 1128 1115 1127 Round trip As you can see the related ULCTable object with ID 1118 gets removed on the server (this corresponds to step 3) from above. For your button case the behaviour of ULC is identical. I guess the reason why you ran into problems is that you only enforced GCs on the client but not on the server (before). But the latter is a precondition for the release mechanism to complete as explained above. Greetings, Daniel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Anton Levcik Sent: Donnerstag, 18. Mai 2006 08:45 To: '[EMAIL PROTECTED] Com' Subject: [ULC-developer] Very late executing garbage collection for UITable objects - second request Hi, Sorry for reminder. I know, that we have not paid service for fast help. Nevertheless I would like to reminder my question, that I mailed. We prepape project that whould have use ULCTable object very intensive and client whould have use application very hours in a day. Therefore us worry behaviour garabage collector on the server by using ULCTable objects. Thanks for advice Levcik Anton From: Anton Levcik [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 12:40 PM To: '[EMAIL PROTECTED] Com' Subject: Very late executing garbage collection for UITable objects Hi, I have problem with release memory on ULC client computer. When application is executing very long time, crashes on low memory exception. I prepared test application, that generate after click on button 2 cattegories objects: ULCButton and ULCTable. Click on button with title "Button" generates 100 instances ULCButton and click on button with title "Table" generates instance ULCTable in tabbed panes. This application I deployed on Tomcat server and tested it using JProfiler tool. When I generated only ULCButton instances, memory on client and server releassed very exactly and all objects ULCButton was allvays released. When I generated only ULCTable objects, after released ULCTable instances on server and recalled garbage collector, and activated round trip to server (using button with title "Round trip") and recalled gc on client, Instances UITable did not releassed. These insatnce were releassed, bat after many efforts with gc, roundtrips, and continous using ULCTable instances. Why process releassing ULCTable is executting so late? Therefore in memory on client side is very much objects. My test application I attache to this mail. Thanks for help. Levcik Anton _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
