[Laszlo-dev] For Review: Change 20070909-bargull-8 Summary: Fix for memory leak in LzParsedPath

André Bargull a.bargull at intensis.de
Sun Sep 9 04:17:01 PDT 2007


Change 20070909-bargull-8 by bargull at dell--p4--2-53 on 2007-09-09 12:12:11
in /home/Admin/src/svn/openlaszlo/branches/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Fix for memory leak in LzParsedPath

New Features:

Bugs Fixed:
LPP-4214 - "LzDatapointer#ppcache" leaks memory

Technical Reviewer: hminsky
QA Reviewer: ptw
Doc Reviewer: (pending)

Documentation:
Added "getContext()" to LzParsedPath which replaces the direct access to 
"context"-member of "LzParsedPath".
With this change the "context"-member of LzParsedPath is only used for 
"new"-datasets (xpath:"new:/foo/bar").
This API-Change was necessary, because LzParsedPath was holding a 
reference to a dataset through his "context"-member,
but even if this dataset was destroyed, the reference was not cleared.
This led to two bugs:
1. it was preventing garbage-collection
2. when a user created a new dataset with the same name, cached 
LzParsedPaths were still pointing to the old dataset,
which gave some strange errors i.e. when a user used 
xpath:"ds:/foo/text()" (cached) this gave the old results,
but xpath:"ds:/foo" (non-cached) and then a LzDatapointer#getNodeText() 
gave new results.
For better understanding of this issue, please see the attached testcase 
at LPP-4214.

Release Notes:

Details:
The marked memory leaks in the testcase are covered by LPP-4688


Tests:
Testcase is attached at LPP-4214

Files:
M WEB-INF/lps/lfc/data/LzDatapointer.lzs
M WEB-INF/lps/lfc/data/LzParsedPath.lzs

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20070909-bargull-8.tar

-- 
Official OpenLaszlo-Committer ^_^



More information about the Laszlo-dev mailing list