-
February 4th, 2004, 06:16 AM
#1
Is this So Costly ?
Hi,
There is function like
MyFunction( T* apElements, int anCount );
As it can be seen it accepts an array as argument..
In my code, I have a pointer to array ( MyObject** ),
and I need to pass this array to the MyFinction...
If I write like followings in my code, does it becomes a costly operation? I mean, I do de-reference 'a pointer to array' to 'an array'; and the size of array is very large( e.g. 100.000 ); In this case how does 'de-referencing' behave ? Does it dereference all thousands of objects or something else ?
CMain::OnOk()
{
MyObject** pMyObjs;
// create it...
// initialize them..
//...
MyFunction( *pMyObject, 100000 ); // is this de-referencing costly?
}
Thanks...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|