Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Garbage Collection

Xammy10Xammy10 Member ✭✭✭

I'm still looking for a solution to this/:

08-31 11:28:08.840 I/monodroid-gc( 2456): 46152 outstanding GREFs. Performing a full GC!
08-31 11:28:09.020 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.020 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.11ms
08-31 11:28:09.020 D/Mono ( 2456): GC_MAJOR: (user request) time 171.54ms, stw 179.52ms los size: 3228K in use: 1613K
08-31 11:28:09.020 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.020 I/monodroid-gc( 2456): 46153 outstanding GREFs. Performing a full GC!
08-31 11:28:09.200 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.200 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.15ms
08-31 11:28:09.200 D/Mono ( 2456): GC_MAJOR: (user request) time 170.30ms, stw 174.44ms los size: 3228K in use: 1613K
08-31 11:28:09.200 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.200 I/monodroid-gc( 2456): 46154 outstanding GREFs. Performing a full GC!
08-31 11:28:09.380 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.380 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.15ms
08-31 11:28:09.380 D/Mono ( 2456): GC_MAJOR: (user request) time 173.25ms, stw 177.41ms los size: 3228K in use: 1613K
08-31 11:28:09.380 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.380 I/monodroid-gc( 2456): 46155 outstanding GREFs. Performing a full GC!
08-31 11:28:09.550 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.550 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.14ms
08-31 11:28:09.550 D/Mono ( 2456): GC_MAJOR: (user request) time 169.83ms, stw 173.94ms los size: 3228K in use: 1613K
08-31 11:28:09.550 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.550 I/monodroid-gc( 2456): 46156 outstanding GREFs. Performing a full GC!
08-31 11:28:09.730 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.730 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.15ms
08-31 11:28:09.730 D/Mono ( 2456): GC_MAJOR: (user request) time 170.07ms, stw 174.26ms los size: 3228K in use: 1613K
08-31 11:28:09.730 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.730 I/monodroid-gc( 2456): 46157 outstanding GREFs. Performing a full GC!
08-31 11:28:09.900 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:09.900 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.15ms
08-31 11:28:09.900 D/Mono ( 2456): GC_MAJOR: (user request) time 169.61ms, stw 173.69ms los size: 3228K in use: 1613K
08-31 11:28:09.900 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:09.900 I/monodroid-gc( 2456): 46158 outstanding GREFs. Performing a full GC!
08-31 11:28:10.080 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:10.080 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.14ms
08-31 11:28:10.080 D/Mono ( 2456): GC_MAJOR: (user request) time 170.28ms, stw 174.47ms los size: 3228K in use: 1613K
08-31 11:28:10.080 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4176K
08-31 11:28:10.080 I/monodroid-gc( 2456): 46159 outstanding GREFs. Performing a full GC!
08-31 11:28:10.250 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:10.250 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.14ms
08-31 11:28:10.250 D/Mono ( 2456): GC_MAJOR: (user request) time 169.94ms, stw 174.04ms los size: 3228K in use: 1613K
08-31 11:28:10.250 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4177K
08-31 11:28:10.250 I/monodroid-gc( 2456): 46160 outstanding GREFs. Performing a full GC!
08-31 11:28:10.430 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:10.430 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.15ms
08-31 11:28:10.430 D/Mono ( 2456): GC_MAJOR: (user request) time 169.94ms, stw 174.10ms los size: 3228K in use: 1613K
08-31 11:28:10.430 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4177K
08-31 11:28:10.430 I/monodroid-gc( 2456): 46161 outstanding GREFs. Performing a full GC!
08-31 11:28:10.600 D/Mono ( 2456): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 0 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.00ms tarjan 0.00ms scc-setup 0.00ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.01ms
08-31 11:28:10.600 D/Mono ( 2456): GC_BRIDGE: Complete, was running for 0.16ms
08-31 11:28:10.600 D/Mono ( 2456): GC_MAJOR: (user request) time 170.59ms, stw 174.68ms los size: 3228K in use: 1613K
08-31 11:28:10.600 D/Mono ( 2456): GC_MAJOR_SWEEP: major size: 5200K in use: 4177K
08-31 11:28:10.600 I/monodroid-gc( 2456): 46162 outstanding GREFs. Performing a full GC!

There's no end to this, I try creating new application, but still nothing happened IDK what is the cause of this eror :(

Help will be appreciated soo muchhh
Thank's in advance :))))

Best Answer

  • Xammy10Xammy10 Member ✭✭✭
    Accepted Answer

    I solve it by separating my activity instance

    Instead of using:

    public SampleActivity sampleActivity = new SampleActivity();
    

    I use:

    public SampleActivity sampleActivity;
    

    and on my on create:

    sampleActivity = new SampleActivity();
    

    Idk what is the difference of these codes, but that solve my problems :)

Answers

  • Xammy10Xammy10 Member ✭✭✭
    Accepted Answer

    I solve it by separating my activity instance

    Instead of using:

    public SampleActivity sampleActivity = new SampleActivity();
    

    I use:

    public SampleActivity sampleActivity;
    

    and on my on create:

    sampleActivity = new SampleActivity();
    

    Idk what is the difference of these codes, but that solve my problems :)

Sign In or Register to comment.