[mono-android] debugger constantly detaches
Sayed Arian Kooshesh
kooshesh at gmail.com
Thu Jun 14 16:53:26 UTC 2012
anyway, epeen aside,
dude.
make a premade pool. when you need more, look at mem and the size you can
make more.
when you have a threshold of like 20 megs left. say, program must
exit(gracefully) . get a better phone or uninstall stuff user.
anyway sorry jon I get caught up in the momeny :P
On Thu, Jun 14, 2012 at 11:50 AM, Sayed Arian Kooshesh
<kooshesh at gmail.com>wrote:
> 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
>
--
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/de7a7e35/attachment.html>
More information about the Monodroid
mailing list