NlMakesis Y-Browser Y-Tasks
if we push the following pointers to the stack as follows:
CleanupStack::PushL(obj1); CleanupStack::PushL(obj2); CleanupStack::PushL(obj3);
is it possible to pop as follows:
CleanupStack::Pop(obj2);
before I pop obj3?
rgds nex
No, it wouldn't be a stack if you could do that, it'd be a cleanupqueue or cleanuparray etc.
I've never come accross the need to do this, so are you sure you think you need to?
No, it is not possible to do that way. The cleanupstack is a FILO. BTW why would you need to do that?
Chao, Raghav
then what would be the meaning of stack?
ready to face
okey tank you all.
You can, of course, pop out the topmost object(s), then popanddestroy the one you want, and pushl the other objects back again.
Eric Bustarret NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 132
No, it wouldn't be a stack if you could do that, it'd be a cleanupqueue or cleanuparray etc.
I've never come accross the need to do this, so are you sure you think you need to?
Forum posts: 95
No, it is not possible to do that way. The cleanupstack is a FILO. BTW why would you need to do that?
Chao,
Raghav
Forum posts: 29
then what would be the meaning of stack?
ready to face
Forum posts: 30
okey tank you all.
Forum posts: 587
You can, of course, pop out the topmost object(s), then popanddestroy the one you want, and pushl the other objects back again.
Forum posts: 1886
It happened to me once. In some quite shitty/badly structured code I must admit.
And you probably don't have any other simple alternatives! This is at least why I did in my case.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant