×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Web browser control WP8 using ram reduce on close view

    I use in my application a webbrowser control. i use the control for navigate to many site and when i close the view, the memory is not reduced.
    Always remains on 50/60 MB. it is possibile reduce memory?

    i'm insert

    protected override async void OnNavigatedFrom(NavigationEventArgs e)
    {
    await MyWebBrowser.ClearInternetCacheAsync();

    GC.Collect();
    GC.WaitForPendingFinalizers();
    GC.Collect();

    }

    but not it works.

    this is a my project example
    https://www.box.com/shared/static/gq...1nbies8p6y.zip

    if you navigate on a particular site receive memory leak.
    for example gazzetta.it (italian sport site)

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Web browser control WP8 using ram reduce on close view

    Memory and heap are not necessarily the same thing. Roughly said if you allocate 1 megabyte, then 50 megabytes, then 1 megabyte, and free the 50 megabytes block, depending on the GC method, the heap may remain 52 megabytes large, containing 1-1 megabyte at both ends, and a lot of free space in the middle (which subsequent allocations will reuse). There seem to be some GCSettings thing http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx, you can try if it has some effect.

  3. #3
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Re: Web browser control WP8 using ram reduce on close view

    GCSettings in a windows phone?
    how to use? do you have a example?

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: Web browser control WP8 using ram reduce on close view

    Quote Originally Posted by ideasolutions View Post
    GCSettings in a windows phone?
    how to use? do you have a example?
    Generally you don't need to. Is memory usage growing over time?

    Also, ClearInternetCacheAsync() clears the disk cache for the browser, it doesn't free up RAM.

  5. #5
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Re: Web browser control WP8 using ram reduce on close view

    ClearInternetCacheAsync you know, it was one more thing to do.
    memory grows when I navigate on the site with webbrowser (and this is normal) but when I leave the view does not diminish
    70/80 MB remain allocated..
    in my post I have attached the sample project. if you can take a look

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: Web browser control WP8 using ram reduce on close view

    If you view the page with the WebBrowser control several times, does the memory usage grow by several times... or just one?

  7. #7
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Re: Web browser control WP8 using ram reduce on close view

    scenario

    1)Open the view with webbrowser control.. use webbrowser for navigate to ours site. Memory is high but no memory exception.
    2)Close the view with webbrowser control, the memory remains 70/80MB.
    3)Open another view (with no webbrowser) memory is high (previous open webbrowser)

    in my post is a project, you can try?
    navigate to gazzetta.it and close view (with webbrowser). Memory high

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: Web browser control WP8 using ram reduce on close view

    70/80MB memory usage is not an issue on WP8 - does the memory usage continue to grow, if not then there is no memory leak.

    (I won't be downloading your project)

  9. #9
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Re: Web browser control WP8 using ram reduce on close view

    if i use this option
    http://msdn.microsoft.com/it-it/libr...vs.105%29.aspx

    user who download my app from some particular message?

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Web browser control WP8 using ram reduce on close view

    Quote Originally Posted by ideasolutions View Post
    1)Open the view with webbrowser control.. use webbrowser for navigate to ours site. Memory is high but no memory exception.
    2)Close the view with webbrowser control, the memory remains 70/80MB.
    3)Open another view (with no webbrowser) memory is high (previous open webbrowser)
    How high? Does it jump to 100+?

  11. #11
    Registered User
    Join Date
    Aug 2013
    Posts
    14

    Re: Web browser control WP8 using ram reduce on close view

    Yes, over 100MB memory.

    this is a my project example
    https://www.box.com/shared/static/gq...1nbies8p6y.zip

    if you have a fee minutes and look

Similar Threads

  1. Browser Control Example on View
    By sunitha.m13 in forum Symbian Networking & Messaging (Closed)
    Replies: 7
    Last Post: 2010-09-17, 15:16
  2. Replies: 2
    Last Post: 2010-02-18, 08:58
  3. Replies: 0
    Last Post: 2009-11-27, 09:45
  4. Browser control+View
    By soumaya in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-05-08, 12:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×