Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7719731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:29:20+00:00 2026-06-01T03:29:20+00:00

My question is not clear at title [i can not write it exactly] e.g

  • 0

My question is not clear at title [i can not write it exactly]

e.g Texture2D picture = Content.Load<Texture2D>("myPicture");

what does happen on memory if the code above runs ? As I know Content caches the “myPicture” to the memory and return a reference to the Texture2D picture. Am I wrong ? If “myPicture” is loaded to another Texture2D object “myPicture” is not duplicated so it returns only a reference.

Is each file (or content-file) loaded over Content cached to memory (also allocated on Ram) without duplicating ? (i believe this my question with all written above should be checked)

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:29:21+00:00Added an answer on June 1, 2026 at 3:29 am

    Each instance of ContentManager will only load any given resource once. The second time you ask for a resource, it will return the same instance that it returned last time.

    ReferenceEquals(Content.Load<Texture2D>("something"),
                    Content.Load<Texture2D>("something")) == true
    

    To do this, ContentManager maintains a list of all the content it has loaded internally. This list prevents the garbage collector from cleaning up those resources – even if you are not using them.

    To unload the resources and clear that internal list, call ContentManager.Unload. This will free up the memory the loaded resources were using. Now if you ask for the same resource again – it will be re-loaded.

    Of course, if you are using those resources when you call Unload, all of those shared instances that you loaded will be disposed and unusable.

    Finally, don’t call Dispose on anything that comes out of ContentManager.Load, as this will break all the instances that are being shared and cause problems when ContentManager tries to dispose of them in Unload later on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure how clear my question is by the title, but I
The title of this question is not very clear but I cannot explain what
The question title is not very clear so let me explain. I am trying
Not sure it is clear from this question title what I mean, so here
(using jQuery 1.4.4 edition) The title of the question might not be that clear,
The title pretty much asks the whole question - How can I clear ONLY
The question might not be clear, so i will explain further. I saw some
Ok, the question might not be crystal clear. Let me give some details: Let's
Since my question from yesterday was perhaps not completely clear and I did not
I could not find a clear answer to this question elsewhere, so I'll try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.