Skip to main content
removing a banned tag. If you see this, please start editing the tag out from lowest voted posts to get this done tonight. (fyi, Gnemlock: my edits are maxed so if you could please make edits after approving that would be appreciated. I really want to hurry and surprise Josh with it done.)
Source Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60

Managing What is the most efficient way to access resources?

I have a resource manager that loads and returns resources. Currently, I just return shared_ptrsshared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more explicit ownership, and also less overhead, rather than using smart_ptrssmart_ptrs.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

The reason I am asking is that I was reading this article  which, which made me wonder if I should implement something like that, instead.

Thanks

Managing resources

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more explicit ownership and also less overhead rather than using smart_ptrs.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

The reason I am asking is that I was reading this article  which made me wonder if I should implement something like that instead.

Thanks

What is the most efficient way to access resources?

I have a resource manager that loads and returns resources. Currently, I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more explicit ownership, and also less overhead, rather than using smart_ptrs.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

The reason I am asking is that I was reading this article, which made me wonder if I should implement something like that, instead.

removing a banned tag. If you see this, please start editing the tag out from lowest voted posts to get this done tonight. (fyi, Gnemlock: my edits are maxed so if you could please make edits after approving that would be appreciated. I really want to hurry and surprise Josh with it done.)
Link
Tweeted twitter.com/#!/StackGameDev/status/357868956125626370
added 245 characters in body
Source Link
KaiserJohaan
  • 1.5k
  • 2
  • 23
  • 43

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more control in the resource manager over the lifespan of the resourceexplicit ownership and also less overhead rather than using smart_ptrs.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

The reason I am asking is that I was reading this article which made me wonder if I should implement something like that instead.

Thanks

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more control in the resource manager over the lifespan of the resource and also less overhead.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, whereby you get an ID you use to access the resource. The reasons are more explicit ownership and also less overhead rather than using smart_ptrs.

Are resource handles the most efficient way to access resources, should I stick with shared_ptrs or are there other alternatives?

The reason I am asking is that I was reading this article which made me wonder if I should implement something like that instead.

Thanks

Source Link
KaiserJohaan
  • 1.5k
  • 2
  • 23
  • 43
Loading