http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5452
Summary: Many circular references
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
The SpamAssassin libraries create many, many circular references. Unless you
are very careful, this could lead to a memory leak.
Example: Dumping a Mail::SpamAssassin object after a SpamAssassin run reveals
about 233 lines of back-references.
The circular references are used for two purposes as far as I can see:
1) a "main" backreference back to the main SpamAssassin object so plugins can
reach back into it.
2) "performance" backreferences to save typing and time so you don't need to
dereference 4 or 5 hashes and arrays to walk the data structure.
(1) could be solved by passing the main SpamAssassin object around as an
argument to methods and functions that need it. (2) might be solvable by
limiting the scope of the performance backreferences to "my" variables.
Fixing this will be an awful lot of work. Maybe we should wait for Perl to have
a proper mark/sweep GC engine. :-)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.