[Fb-contrib-commit] SF.net SVN: fb-contrib: [494] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/det
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-04-19 01:06:38
|
Revision: 494 Author: dbrosius Date: 2006-04-18 18:06:26 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=494&view=rev Log Message: ----------- Manually cleanup memory now that StatelessDetector is removed. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2006-04-19 01:04:58 UTC (rev 493) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2006-04-19 01:06:26 UTC (rev 494) @@ -47,24 +47,19 @@ */ public PartiallyConstructedObjectAccess(final BugReporter bugReporter) { this.bugReporter = bugReporter; - stack = new OpcodeStack(); } - /** - * clone this detector so that it can be a StatelessDetector - * - * @return a clone of this object - */ @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - @Override public void visitClassContext(final ClassContext classContext) { - JavaClass cls = classContext.getJavaClass(); - if ((cls.getAccessFlags() & Constants.ACC_FINAL) == 0) - super.visitClassContext(classContext); + try { + JavaClass cls = classContext.getJavaClass(); + if ((cls.getAccessFlags() & Constants.ACC_FINAL) == 0) { + stack = new OpcodeStack(); + super.visitClassContext(classContext); + } + } finally { + stack = null; + } } @Override This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |