Skip to main content
gamedev.net
🔒 Locked

boost smart pointers on game

Started by giugio 2 replies 850+ views
Original Post
giugio
giugio
Hy.
Is the boost smart pointers too expensive for use they in a game?
Is better use internal smart pointer created ad hoc?
thanks.
brwarner
brwarner
I use them all the time in games with either 3D or 2D graphics and have not noticed any severe performance problems. Theoretically when using them for access the only operation is a regular dereference and copying a smart pointer just increments a counter somewhere.
Rattrap
Rattrap
Boost did a performance test on theirs (and several other methods) compared to a raw pointer.

Boost - Smart Pointer Timings.
"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.