R class & RArray
| Mon, 2008-07-07 19:40 | |
|
Hi I can create R class object like c++ array RMyClass mc[10];, it create 10 object in the stack If I do link the following is that ok Local variable imyarray.Appand(obj1) .... Thanks |
|
| Mon, 2008-07-07 19:40 | |
|
Hi I can create R class object like c++ array RMyClass mc[10];, it create 10 object in the stack If I do link the following is that ok Local variable imyarray.Appand(obj1) .... Thanks |
|
Forum posts: 162
Hi neeloor,
RArray follows copy by value semantics and hence if you append something to it, a copy is made and appended to the array, which means its safe for what you are doing. The only thing to remember is that the usual rules specific to Symbian C++ still applies and you need to be careful about wonership issues, i.e. if you append a R class you should take care to close it later on etc.
http://www.tanzim.co.uk
Forum posts: 99
do it like this:
class MyClass; //some class,can be defined ltrRArray<MYClass> iMcArray;
MyClass obj1;
iMcArray.Append(obj1);
Shashi Kiran G M