Quantcast
Channel: Store Object or Pointer in a Vector - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Store Object or Pointer in a Vector

$
0
0

I asked a very similar question here but since it is such a fundamental issue I would like to state my (new) question more precicely.

Say I have a very complex class A and each instance of A is stored in multiple containers such as vectors, queues,...

Even in a static setting, meaning that the objects get added to the containers once and will not be deleted nor modified:
Should the containers now contain pointers to the objects or the objects itself?


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images