hi everyone, i have a little bit lame question, but it's time i have this finally clear. consider regular function with some parameters and a return type.
My questions are:
are there always made some copies of parameters? i mean even if the function expects reference or pointer as parameter, there are actually new references/pointers created, right? when the function is over are there some destructors called for those?
is it the same with return values? is the returned value also copied from the context of the actually performed function? or are those just addresses somewhere and the value in the context is destructed too?
i probably didn't express it too clearly sooo.. if you just explained in your way how does it work with memory when some function is called i would be thankful. I have just casual idea about function of processors, but i have already dealt with assembler so there is at least something to work with.