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 8130215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:37:44+00:00 2026-06-06T08:37:44+00:00

I have a texture manager that I am running as singleton, and wish to

  • 0

I have a texture manager that I am running as singleton, and wish to make a objectmanger in the same way..

Anyway.. I copied the EAXACT code that is working 100% in the texturemanager but in the object manager it is giving me this error “Non Static Member Reference mush be relative to specific object”

I assume it has something to do with the std::map?

Here is my 100% working textureManager header and cpp file.
http://ideone.com/6bZQG | http://ideone.com/jjo2M

Here is the start of the ObjectManager that is NOT working…
http://ideone.com/rhSim | http://ideone.com/uLj4X

Now, basically the pointer to std::map is where I am getting the error.. (line 23 of ObjectManager.cpp) The delete call in destroy() is giving me that error and anywhere else (if I make a new function. Yet the timer variable is working as expected.

Is there some fancy way I am supposed to do a pointer to a std::map? As far as i can tell this code is 100% the same as the code for the texture manager?

Thanks for any advise!

  • 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-06T08:37:47+00:00Added an answer on June 6, 2026 at 8:37 am

    To roughly repeat what I said on IRC:

    • You do not want a pointer to std::map — it does not save you any copies, and will likely cost more memory and effort to maintain.
    • If you don’t care about the order in which the various singletons are destroyed, use a unique_ptr for them: see header and implementation.
    • Boost has a perfectly fine noncopyable, use that (your implementation still allowed assignment, for example).

    As to why your version was not working: on line 23 of your implementation file, you were referring to gameObjects without specifying which instance you meant. You probably meant instance->gameObjects.

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

Sidebar

Related Questions

i have a GLSurfaceView, that has a texture that i need to change when
I have a texture that follows a user's finger in GLKit. I calculate the
I have one texture that has some portions which are transparent transparent I want
I have a texture that is semi-transparent with varying opacity at different locations. I
I have some quads that have a texture with transparency and some objects behind
If I have a texture, is it then possible to generate a normal-map for
With WPF 3D, is it possible to have a texture with an alpha channel?
I have an OpenGL texture with transparent and opaque pixels (eg, texture contains a
What I currently have: Generating of texture coordinates given the width and height of
This is hopefully a simple question: I have an OpenGL texture and would like

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.