A: 

When you created your UIViewControllers you never released your own ownership of it, so until you release it yourself, it will never go away. The problem is that nothing else owns the UIViewControllers, so if you used autorelease, they would be deallocated right away.

My solution would be to create an NSMutableArray and add them to the array before calling release on them. Then, when you want to release all of your UIViewControllers, remove them from the array. NSMutableArray retains ownership of objects you add to it and releases ownership upon removal or deallocation. Something like this:

-(id) init {
    subViewControllers = [NSMutableArray new];
}
...
-(void)AddOneButton:(NSInteger)myButtonTag {
    ...
    if(categoryType==1) {
        MultiChoiceThumbViewControllerobj = [[MultiChoiceThumbViewController alloc] initWithPageNumber:myButtonTag+1];
        MultiChoiceThumbViewControllerobj.view.frame=frame2;
        MultiChoiceThumbViewControllerobj.lblCounter.text=[NSString stringWithFormat:@"%d of %d",myButtonTag+1,flashCardsId.count];
        MultiChoiceThumbViewControllerobj.lblQuestion.text=[flashCardText objectAtIndex:myButtonTag];
        [myScrollView addSubview:MultiChoiceThumbViewControllerobj.view];
        [subViewControllers addObjet:MultiChoiceThumbViewControllerobj];
        [MultiChoiceThumbViewControllerobj release];
    }
    [myScrollView addSubview:Button];
}
...
- (void) removeSuperviews {
    for(UIView *subview in [myScrollView subviews]) {
            [subview removeFromSuperview];
            NSLog(@"Subviews Count=%d",myScrollView.subviews.count);
    }
    [subViewControllers removeAllObjects];
}
Ed Marty
thanks so much it worked...could you please explain this in more detailed manner
Rahul Vyas
you missed this [MultiChoiceThumbViewControllerobj release];line after this line [subViewControllers addObjet:MultiChoiceThumbViewControllerobj];
Rahul Vyas