title: MonoTouch_Disposer.Drain Exception displaying PDF content
body: <p>I'm writing an app that makes heavy use of the PDF viewer to display various documents, and every so often after browsing my document library I encounter the following exception:</p>
  
  <p>OutputLayer: Ecolab.SalesPad.ContentItem FreedomAire 3 Helmet
  Thread finished: 
  Stacktrace:</p>
  
  <p>at MonoTouch.Foundation.NSObject/MonoTouch_Disposer.Drain (MonoTouch.Foundation.NSObject) &lt;0x000eb>
    at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) &lt;0xffffffff>
    at MonoTouch.UIKit.UIApplication.Main (string[],string,string) &lt;0x0010f>
    at Ecolab.SalesPad.Touch.Application.Main (string[]) [0x00000] in /Users/itrgroup/Projects/SalesPad/SalesPad.Touch/Main.cs:20
    at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) &lt;0xffffffff></p>
  
  <p>Native stacktrace:</p>
  
  <pre><code>0   SalesPadTouch                       0x00b62b18 mono_handle_native_sigsegv + 456
  1   SalesPadTouch                       0x00b484e4 mono_sigsegv_signal_handler + 428
  2   libsystem_c.dylib                   0x34db7539 _sigtramp + 48
  3   UIKit                               0x35107b23 -[UISearchDisplayController dealloc] + 78
  4   libobjc.A.dylib                     0x3564b0c5 _objc_rootRelease + 36
  5   SalesPadTouch                       0x00489eb8 wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr + 68
  6   SalesPadTouch                       0x0028d094 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
  7   SalesPadTouch                       0x00b48108 mono_jit_runtime_invoke + 2892
  8   SalesPadTouch                       0x00c40414 mono_runtime_invoke + 200
  9   SalesPadTouch                       0x00cd3944 monotouch_trampoline + 3140
  10  CoreFoundation                      0x33e9222b -[NSObject performSelector:withObject:] + 42
  11  Foundation                          0x31a01757 __NSThreadPerformPerform + 350
  12  CoreFoundation                      0x33f07b03 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
  13  CoreFoundation                      0x33f072cf __CFRunLoopDoSources0 + 214
  14  CoreFoundation                      0x33f06075 __CFRunLoopRun + 652
  15  CoreFoundation                      0x33e894dd CFRunLoopRunSpecific + 300
  16  CoreFoundation                      0x33e893a5 CFRunLoopRunInMode + 104
  17  GraphicsServices                    0x35ac9fcd GSEventRunModal + 156
  18  UIKit                               0x34fce743 UIApplicationMain + 1090
  19  SalesPadTouch                       0x00491160 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
  20  SalesPadTouch                       0x00073d60 Ecolab_SalesPad_Touch_Application_Main_string__ + 152
  21  SalesPadTouch                       0x0028d094 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
  22  SalesPadTouch                       0x00b48108 mono_jit_runtime_invoke + 2892
  23  SalesPadTouch                       0x00c40414 mono_runtime_invoke + 200
  24  SalesPadTouch                       0x00c4353c mono_runtime_exec_main + 836
  25  SalesPadTouch                       0x00c4253c mono_runtime_run_main + 968
  26  SalesPadTouch                       0x00b4f1b8 mono_jit_exec + 244
  27  SalesPadTouch                       0x00b424fc main + 4076
  28  SalesPadTouch                       0x00002914 start + 52
  </code></pre>
  
  <p>=================================================================
  Got a SIGSEGV while executing native code. This usually indicates
  a fatal error in the mono runtime or one of the native libraries </p>
  
  <h1>used by your application.</h1>
  
  <p>It hits this on MonoTouch.Disposer_Drain every time.  Sometimes after ViewDidAppear is called, sometimes before.  I can't find any advice on MonoTouch.Disposer_Drain in a Google search.  Has anyone run into this before?  Any advice on what the cause and/or a workaround would be?</p>
  
  <p>Thanks!
  Scott --</p>