[mono-android] debugger constantly detaches
Sayed Arian Kooshesh
kooshesh at gmail.com
Thu Jun 14 16:50:36 UTC 2012
see the point is, my programs don't run out of memory. If he has a premade
pool, it won't run out of memory. POint of style my ass
On Thu, Jun 14, 2012 at 11:47 AM, Sayed Arian Kooshesh
<kooshesh at gmail.com>wrote:
> I've had the deconstruct called in debugging testing, is that a flaw?
>
>
> On Thu, Jun 14, 2012 at 10:35 AM, Jonathan Pryor <jonp at xamarin.com> wrote:
>
>> On Jun 13, 2012, at 9:30 AM, Sayed Arian Kooshesh wrote:
>> > this is an idea but since I don't know your design, I don't know if it
>> will fit.
>> >
>> >
>> > make a
>> >
>> > [Application]
>> > public class myGlApp: Application
>> > {
>> >
>> > public void onCreate()
>> > {
>> > //create a pool of float bytes here that you can reuse
>> >
>> > }
>> >
>> > ~myGlApp()
>> > {
>> > //MAKE SURE TO DESTROY POOL PROPERLY
>> > }
>>
>> I doubt that this will work, as I doubt that the myGIApp finalizer will
>> ever be invoked. The Application instance is a singleton that is alive for
>> as long as the process lives, and when Android exits the process Android
>> doesn't give the GC a chance to run (why should it?), and even if it did
>> give the Dalvik GC a chance to run it's highly unlikely that Mono's GC
>> would get a chance to run, and if Mono's GC doesn't run (AND find that
>> Dalvik is no longer referencing the Java-side Application instance!), then
>> Mono's GC won't execute the finalizer.
>>
>> In short, I think it's a safe bet that the Application finalizer will
>> never run, period.
>>
>> Finally, as a point of style, you should never provide a finalizer for
>> Java.Lang.Object subclasses. You should instead override
>> Java.Lang.Object.Dispose(bool):
>>
>>
>> http://androidapi.xamarin.com/index.aspx?link=M:Java.Lang.Object.Dispose(System.Boolean)
>>
>> - Jon
>>
>> _______________________________________________
>> Monodroid mailing list
>> Monodroid at lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>
>
>
> --
> Extreme Knowledge is not something for which he programs a computer but
> for which his computer is programming him.
>
> -Wozniak
>
--
Extreme Knowledge is not something for which he programs a computer but for
which his computer is programming him.
-Wozniak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120614/35e632a7/attachment.html>
More information about the Monodroid
mailing list