[Mono-bugs] [Bug 670294] AddSubview and Garbage collection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 12 18:54:48 EDT 2011


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

https://bugzilla.novell.com/show_bug.cgi?id=670294#c23


--- Comment #23 from Mohamed Azmy <azmy at ebseg.com> 2011-08-12 22:54:46 UTC ---
Dear Miguel,

It is very good news that you and your team are back on track 

After working with mono touch for about a year now we have produced created 3
major business applications for banking and stock trading for both iPhone and
iPad 


all these apps have a huge number of xib files around 150 or more per app with
a complex Graphical UI

Our major concern with monotuch development is mainly how to handle memory 

All the apps we have made are facing memory leakage issues foe one reason or
the other and customer comments on th app store are heavily hitting the app in
terms of how it crashes a lot and even causes iOS itself to crash some times 

In fact we have considered several times to use native Xcode instead of
monotuch to solve this issue and our clients were pushing us to give up on mono
touch 

Given that things are coming back on track for monotuch I would highly suggest
the following for your roadmap

1- Resolve all known issues that cause memory leaks whether this current case
or any other and try to find any issues tha prevent GC from working perfectly
well
2- focus heavily and quickly on providing tools needed to find and solve memory
leaks so that developers can make sure of thier apps and resolve their issues 
3- provide some tutorial or knowledge articles on how to deal with memory leaks
in an effective way 
4- at this point when an object is destructed memory is not returned to the iOS
which makes it very hard to know if our app is leaking or not ?

I have already suggested an approach above where the developer can mark a class
for the GC as collectable so that GC can be more effective and avoid memory
leaks and give some control on handling memory issues for tzhe developers 

I think your team should set the memory handling as your first priority task
which will stabilize the product and give a highly needed trust in the
stability of apps built using mono touch 

I also think that most if not all monotuch developers are actually facing these
issues whether they know it or not specially when it is used to build large
apps such as the ones we are doing 

Thanks and awaiting your +ve feedback on the above disucssion 

Mohamed Azmy
Azmy at eBSEG.com

(In reply to comment #22)
> We have a fix coming up in the 4.1 Beta preview.
> 
> For now, once you remove your subviews, do this:
> 
> Before you call RemovefromSuperview, do this:
> 
> var parent = CurrView.Superview;
> CurrView.RemoveFromSuperView ();
> var workaround = CurrView.Superviews;
> CurrView.Dispose ();
> CurrView = null;

-- 
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