For my 2c, I've seen this as a problem that other people have had - not something I've had in my own code. (so far). So maybe it's something I'm (not?) doing...
Like any development, there has to be trade offs. Look at the full framework on Windows, for example. There are 2 versions (server and client) which have very, VERY different GC profiles: the client GC's quickly and often to keep memory usage down, the server does it very infrequently to keep performance up, but is expected to have a lot of RAM to work in. .NET Compact Framework was** closer to MonoTouch, tho MSFT had control over more parts of it. So I would expect something even more different to those on a mobile device which has very limited resources. If we had the windows server CLR's GC model on a mobile device, none of us would actually be doing anything - our apps would just crash with out of memory errors, and hello world would ship as a 20meg+ binary. Or the app would pause for ages while it GC'ed, which would be even worse. For me, thats part of the process of learning mobile development: how the whole system works, in the same way I don't expect (or want to) use windows forms or WPF on the phone*, I expect to have to adapt to the constraints of the platform and environment. Lack of resources and an agressive GC are two of those constraints. (Maybe this stemmed out of learning .NET using the Compact Framework. Even when I'm doing server stuff (my day job), I'm still thinking about where objects are stored and released, leaks, excessive object creation etc) Clearly, this (GCing) is a problem for you and others, or you wouldn't have written this. From my perspective, this is a trade off for being able to use C# - a language I like a lot - on the iPhone - a platform I like a lot, and one I'm willing to work with or around. It does need addressing by Xamarin, but (IMO) it might be more of a documentation / education thing than a code change. Or more likely, both. * ok, maybe silverlight and a form a declarative UI constructions.... maybe. Thats kinda what IB is... ** I've not used it since v1 and 1.1, so that might have changed a bit On Sun, Jan 15, 2012 at 23:02, rnendel <[email protected]> wrote: > IMHO, there is more than one issue around this, and various scenarios that > have involved some known IOS issues, which clouds the problem. I agree with > the reference expectations and that some objects simply don't carry it. > However, there are plenty of <unrecognized selector> errors that the devs > have responded to that involved "class level declarations" as being the > solution due to the aggression changes made to the GC. > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Unknown-selector-and-garbage-collection-tp4297921p4297989.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
