Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

OO-SSJS: Object Orie...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Property Generator f...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

XPages - The Good, T...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 2
photo

Re: XPages - The Goo...

Blog:  Yellow is the...
Tim Tripcony
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

XPages - The Good, T...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 3

Jan Schulz

Blog Authors:  Jan Schulz  

Previous |  Main  | Next

Fun with ... garbage collection

Jan Schulz  |     |  Tags:  oop  |  Comments (0)
Todays fun: my logger (basicly an AgentLog, but with an underlying NotesDocument) opened a second doc where it shouldn't and worse didn't save the first document with the proper logging output. Turned out, that the last logAction call in the logger.delete sub (called by the garbage collector) found that the underlying logdoc was nothing (and so not saved until I turned on flushAlways) and so created a new one with only the "new log opend" and "log closed" message in it. Fun if you expect half a page of debugging output for an webagent (which you need because the agent is not working :-/ ) and only get "Log opened and closed"...

The fix was to cache the parent Database of the Logdocument in the Logger object.

This Database was actually cached (Dim logDB...) in the OpenLogFunction Declaration section (the Logger is an extention), but it seems that this script lib was garbage collected before calling delete on my object and as the DB got collected, so gets every object which came from that DB. By-by logdoc...

It seems that something changed between last years domino (7.0.x or 8.0.1, not sure which I tested on) and 8.0.2 in the garbage collection routine, as the same logger setup worked some month ago without this problems. Or I garabage collection is influenced how many classes/ScriptLibs you use in the your agent...

So, todays lesson learned: Do not cache objects in other scriptlibs Declaration section if you use that object in delete... Fortunately this is my only class with a deconstructor :-)

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.