I’m searching a way that each object knows what position is placing in an Array, having a member variable with its position in the array. I don’t understand well ReferenceCountedArray so I did this little test:
int test = arraytest->getReferenceCount();
Where EventoFrases inherits from ReferenceCountedObject. However test is always ‘2’. I expected that it was ‘0’, because is the place that this object has in the array. It doesn’t matter how many objects I add to arraytest, getReferenceCount() is always ‘2’. I feel a little confused about it.
Could this class serve my purpose? I miss more documentation about it.