title: Do I have to use recycle Notes objects in recurrence functions?
body: <p>I have a recursive function and it uses the Notes objects. Please tell whether I should call recycle method for these objects, or I can leave that to garbage collector?</p>
  
  <pre><code>function getAllUsersInDepartmentAndSub (nd: NotesDocument, arrData: Array) {
    var strSubPrefix = strTaskLibName + "getAllUsersInDepartmentAndSub/";
    try {
      var ndcResp: NotesDocumentCollection;
      var ndResp: NotesDocument;
      var ndNext: NotesDocument;
      var strTemp: string;
  
      if (nd) {
          ndcResp = nd.getResponses();
          if (ndcResp) {
              if (ndcResp.getCount() &gt; 0) {
                  ndResp = ndcResp.getFirstDocument();
                  while (ndResp) {
                      strTemp = @LowerCase(ndResp.getItemValueString("form")); 
                      if (strTemp == "department") {
                          getAllUsersInDepartmentAndSub (ndResp, arrData);
                      } else if (strTemp == "person") {
                          strTemp = ndResp.getItemValueString("fullname");
                          if (@Member(strTemp, arrData) &lt;= 0) {
                              arrData.push(strTemp);                          
                          }
                      }
                      ndNext = ndcResp.getNextDocument(ndResp);
                      ndResp.recycle();
                      ndResp = ndNext;
                  }
              }
              ndcResp.recycle();
          }
      }
    } catch(e) {
      writeInfo(strSubPrefix, e, true, true);
    }
  }
  </code></pre>