我的xPage有一個使用ARRAY作爲數據源的重複控件。該數組從FTSearch獲取值。問題是,它使Domino服務器崩潰,因爲OutOfMemory異常。帶有FTSearch內存泄漏的xPages
REPEAT:
<xp:repeat id="ssRepeat" var="rData" indexVar="rIndex" value="#{javascript:getMyDocs()}">
數據來源SSJS:
function getMyDocs(){
.............
var myArr = new Array();
var dc:NotesDocumentCollection = db.FTSearch(<......>, 100);
var doc:NotesDocument = dc.getFirstDocument();
var tmpdoc:NotesDocument = null;
while (doc != null) {
var xx = doc.getItemValueString("xx");
var yy = doc.getItemValueString("yy");
var zz = doc.getItemValueString("zz");
var ww = doc.getItemValueString("ww");
myArr.push([xx, yy, zz, ww, vv]);
tmpdoc = dc.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}
.............
dc.recycle();
return myArr;
}
你看到什麼錯在我的代碼?這是一個正確的方法嗎?
Note:
1. There can be multiple repeats on the page that use getMyDocs() function to find documents (based on search parameters).
2. FT index is really huge ~1Gb because the db is ~50Gb.
3. Do I recycle() everything right?
我想不通爲什麼多米諾失去它的內存...(v9.0.1 FP6)
謝謝stwissel。那麼,如果xx,yy ..等中的一個是Datetime,那麼我在上面的示例中將在哪裏回收它?我不希望將NULL值置於myArray中,該函數返回 – VladP