2017-06-10 3 views
0

J'essaie de détecter une fuite pour libérer une référence globale dans mon application Android.
Je vois dans le guide de dépannage de XAMARIN il montre très de détails sur le journal de la référence globale.
URL: https://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/#Global_Reference_Messages
Il montre quel objet créer référence global comme:Comment générer un journal de référence global complet pour l'application Android avec XAMARIN

 
I/monodroid-gref(12405): +g+ grefc 108 gwrefc 0 obj-handle 0x40517468/L -> new-handle 0x40517468/L from at Java.Lang.Object.RegisterInstance(IJavaObject instance, IntPtr value, JniHandleOwnership transfer) 
I/monodroid-gref(12405): at Java.Lang.Object.SetHandle(IntPtr value, JniHandleOwnership transfer) 
I/monodroid-gref(12405): at Java.Lang.Object..ctor(IntPtr handle, JniHandleOwnership transfer) 
I/monodroid-gref(12405): at Java.Lang.Thread+RunnableImplementor..ctor(System.Action handler, Boolean removable) 
I/monodroid-gref(12405): at Java.Lang.Thread+RunnableImplementor..ctor(System.Action handler) 
I/monodroid-gref(12405): at Android.App.Activity.RunOnUiThread(System.Action action) 
I/monodroid-gref(12405): at Mono.Samples.Hello.HelloActivity.UseLotsOfMemory(Android.Widget.TextView textview) 
I/monodroid-gref(12405): at Mono.Samples.Hello.HelloActivity.m__3(System.Object o) 

-> On peut voir "à Java.Lang.Object.RegisterInstance" créé référence mondiale.
Mais en réalité, je ne vois compte, gérer les informations d'adresse dans le logcat comme ci-dessous:

 
06-10 14:55:06.225 I/monodroid-gref(19580): +g+ grefc 926 gwrefc 0 obj-handle 0x19/I -> new-handle 0x101682/G from thread '(null)'(1) 
06-10 14:55:06.238 I/monodroid-gref(19580): +g+ grefc 927 gwrefc 0 obj-handle 0x5/I -> new-handle 0x10167e/G from thread 'Threadpool worker'(57) 
06-10 14:55:06.261 I/monodroid-gref(19580): -g- grefc 927 gwrefc 0 handle 0x10167e/G from thread 'Threadpool worker'(57) 
06-10 14:55:06.286 I/monodroid-gref(19580): +g+ grefc 927 gwrefc 0 obj-handle 0x19/I -> new-handle 0x201686/G from thread '(null)'(1) 
06-10 14:55:06.288 I/monodroid-gref(19580): +g+ grefc 928 gwrefc 0 obj-handle 0x1/I -> new-handle 0x20167e/G from thread 'Threadpool worker'(57) 
06-10 14:55:06.295 I/monodroid-gref(19580): +g+ grefc 929 gwrefc 0 obj-handle 0x200019/I -> new-handle 0x10168a/G from thread '(null)'(1) 
06-10 14:55:06.306 I/monodroid-gref(19580): -g- grefc 929 gwrefc 0 handle 0x1676/G from thread 'Threadpool worker'(57) 
06-10 14:55:06.351 I/monodroid-gref(19580): +g+ grefc 929 gwrefc 0 obj-handle 0x200019/I -> new-handle 0x101676/G from thread '(null)'(1) 
06-10 14:55:06.357 I/monodroid-gref(19580): +g+ grefc 930 gwrefc 0 obj-handle 0x100019/I -> new-handle 0x10168e/G from thread '(null)'(1) 

Ai-je manqué un cadre? S'il vous plaît aider!

Répondre