title: R text mining package DocumentTermMatrix with a dictionary in the control list takes way too much memory
body: <p>I have noticed that <code>DocumentTermMatrix(myCorpus, control=list(dictionary=myDict))</code> consumes way more memory than <code>DocumentTermMatrix(myCorpus)</code></p>
  
  <p>Why is this happening?</p>
  
  <p>Any leads?</p>
  
  <p>Here is the code snippet:</p>
  
  <pre><code>library(tm)
  library(XML)
  source("MyXMLReader.r") # contains the myXML reader code 
  myCorpus &lt;- Corpus(DirSource(paste(basepath,"corpus",sep=""))
  readerControl = list(reader = myXMLReader))
  myDict = unlist(readLines("some-file-containing-a-fixed-vocab"))
  </code></pre>
  
  <p>Now here is my question:</p>
  
  <pre><code>dtm = DocumentTermMatrix(mYCorpus) # takes very little extra RAM to do this
  dtm = DocumentTermMatrix(myCorpus,control=list(dictionary=myDict)) # Takes a whole lot of # RAM` which is not even released after dtm is formed...
  </code></pre>
  
  <p>I guess there is a memory leak and possible bug.</p>