title: Why is my object deallocated in swift?
body: <p>I have a NSTextField with a binding value - bind to delegate "self.myObject.Title"
  Running this code</p>
  
  <pre><code>@NSApplicationMain
  
  class AppDelegate: NSObject, NSApplicationDelegate {
  
      @IBOutlet weak var window: NSWindow!
  
      var myObject = OwnObject()
  
      func applicationDidFinishLaunching(aNotification: NSNotification) {
          // Insert code here to initialize your application
          myObject = OwnObject()
          print(myObject.Title)
      }
  
  }
  
  class OwnObject: NSObject {
  
      var Title : String! = ""
  
      override init() {
  
          super.init()
          self.Title = "This is a title"
  
      }
  }
  </code></pre>
  
  <p>will fill the correct title to the TextField but myObject will be deallocated automatically and I am getting this error</p>
  
  <pre><code>2015-06-16 15:43:55.587 testapp109[7896:463502] An instance 0x60000004d4d0 of class testapp109.OwnObject was deallocated while key value observers were still registered with it. Current observation info: &lt;NSKeyValueObservationInfo 0x6080000538c0&gt; (
  &lt;NSKeyValueObservance 0x6080000c3aa0: Observer: 0x6080000c3a30, Key path: Title, Options: &lt;New: NO, Old: NO, Prior: NO&gt; Context: 0x0, Property: 0x608000053890&gt;
  )
  </code></pre>
  
  <p>Why is the object deallocated and how can i prevent this?
  Thanks</p>