After every instance of switch_to_blog() you should call restore_current_blog() to restore the current (actually, previous) blog.
But if you're looping through two or more blogs and calling switch_to_blog() on each, is there any reason not to use an additional switch_to_blog() at the end of the loop to switch to the original blog rather than calling restore_current_blog() at each pass.
E.g.
Why not:
$original_blog_id = get_current_blog_id();
foreach( $blog_ids as $blog_id ){
switch_to_blog( $blog_id );
//Do stuff
}
switch_to_blog( $original_blog_id );
instead of:
foreach( $blog_ids as $blog_id ){
switch_to_blog( $blog_id );
//Do stuff
restore_current_blog_id();
}
