[Mono-bugs] [Bug 688018] New: GC does not collect UIViewController in certain cases (Case 1)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Apr 16 19:43:37 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=688018

https://bugzilla.novell.com/show_bug.cgi?id=688018#c0


           Summary: GC does not collect UIViewController in certain cases
                    (Case 1)
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: iPhone
        OS/Version: Apple iOS 4.2
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: azmy at ebseg.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101
Firefox/4.0

GC does not collect UIViewController in certain cases (Case 1)
1) When UIViewController has a a Custom Button class with Event
2) Custom Button class mean a class inherited from UIButton for example to
implement Draw Event
3) this happens even if you try to remove the Event Handler using -= method on
the event handler
4) if you remove the customer Button class make it a standard UIButton GC works
fine even without removing the Event Handler




Reproducible: Always

Steps to Reproduce:
1. Create a class inherited from UIButton
2. Use this class in a UIViewController
3. Add Event to the Custom UIButton
4. Set the UIViewController to null 
5. the UIViewController destruct-er  is never called
6. if you set the Custom button to UIButton Type instead then the destruct-er
is called normally and GC Collection is fine 

Actual Results:  
Memory for the UIViewController is never released causing memory leaks and
frequent application kill by iOS 

Expected Results:  
GC Collection should occur even if the button type is inherited from UIButton

on Monotouch 4.0

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list