I am using a C++ library that extensively uses references when returning objects, instead of pointers.
My question is, how can I keep those references from being destroyed? For example, in a method of an object, I am trying to build a hash table with a plethora of nodes, obtained from a class by references (actually copy-constructed objects). After I get out of that method, all the stored references are... gone... HOW CAN I KEEP THEM, without using over and over and over again the copy constructor, which really takes some time, when talking about thousands of objects...
Thanks... [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
My question is, how can I keep those references from being destroyed? For example, in a method of an object, I am trying to build a hash table with a plethora of nodes, obtained from a class by references (actually copy-constructed objects). After I get out of that method, all the stored references are... gone... HOW CAN I KEEP THEM, without using over and over and over again the copy constructor, which really takes some time, when talking about thousands of objects...
Thanks... [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro