title: Should an OpenIDE FileObject be closed after creation?
body: <p>When creating modules on the NetBeans platform, the <code>FileObject</code> object represents a file in the virtual file system of the IDE. Creating new <code>FileObject</code>s is simple, but does NetBeans completely control the reference to the actual <code>File</code>, or should I close <code>FileObject</code> myself? My code is like this:</p>
  
  <pre><code>FileObject appRoot = FileUtil.getConfigRoot().getFileObject("myapp");
  
  try {
      FileObject fo = servers.createData(filename);
      fo.setAttribute("name", "a name");
      fo.setAttribute("desc", "a description");
  } catch (IOException ex) {
     throws new FileCreationException("Could not create file " + filename, ex);            
  } 
  </code></pre>
  
  <p>With the above code, am I leaving open some references to the actual file or should I obtains the <code>OutputStream</code> of the <code>FileObject</code> and close it manually?</p>
  
  <p>Thanks.</p>