title: How to set lateinit Kotlin property to null
body: <p>The below class has a very unique lifecycle, which requires me to temporarily null out <code>lateinit</code> properties</p>
  
  <pre><code>class SalesController : BaseController, SalesView {
      @Inject lateinit var viewBinder: SalesController.ViewBinder
      @Inject lateinit var renderer: SalesRenderer
      @Inject lateinit var presenter: SalesPresenter
      lateinit private var component: SalesScreenComponent
  
      override var state = SalesScreen.State.INITIAL  //only property that I want to survive config changes
  
      fun onCreateView(): View {  /** lateinit variables are set here */ }
      fun onDestroyView() {
           //lateinit variables need to be dereferences here, or we have a memory leak 
           renderer = null!! //here's the problem: throws exception bc it's a non-nullable property
  </code></pre>
  
  <p>}
      }</p>
  
  <p>Here's how it's used by the framework.</p>
  
  <pre><code>controller.onCreateView() //same instance of controller
  controller.onDestroyView() //same instance of controller
  controller.onCreateView() //same instance of controller
  controller.onDestroyView() //same instance of controller
  </code></pre>
  
  <p>My <code>lateinit</code> properties are injected by dagger, and I need to set them to <code>null</code> in <code>onDestroyView</code> - or have a memory leak. This however is not possible in kotlin, as far as I am aware (without reflection). I could make these properties nullable, but that would defeat the purpose of Kotlin's null safety.</p>
  
  <p>I'm not quite sure how to solve this. Ideally there could be some type of annotation processor that would generate java code to null out specific variables automatically in <code>onDestroyView</code>?</p>