I have done a few searches, however, have not come across the information I need.

I understand basic scope rules and how scope in code generally works. What I am a bit confused with is this:

due to seeing code similar to this, I am assuming that it won't create any sort of memory leak...
Code:
function( class_constructor( constructor_arg ) );
please correct that assumption if it is incorrect.

what I am wondering, is if i have written a class that overloads the insertion operator to take a string as the argument ( internally it inserts that string into a file stream and does a couple other things ) is this valid, or will it cause memory leaks by not destroying the string?
Code:
my_class  class_obj;
class_obj << string( "initial string to create" );
and yes, i understand that there would be no need to actually use the code above. again, I may be wrong, so please do correct me if there is a simpler way, but it seemed to me, that the easiest way to convert an integer to a string was to insert it into a stringstream, then extract a string. so i wrote a function that does this and returns a c++ string type. so, my final question is, based on the below;
Code:
// I generally use this to write log entries to a file, where putting 
// an integer value between two string literals is useful
class_obj << string( "the value of i = " + int_to_str( var1 ) + "and something else" );
will passing the constructor as a parameter to the insertion operator, or the returned string from the function int_to_str cause memory leaks?
if not, when do those objects actually go out of scope?

any help will be greatly appreciated, and i do apologize if i have missed resources or information where this question has already been answered. if that is the case, a link to them would be most appreciated, thank you.