C++ code:
person* NewPerson(void) { person p; /* ... */ return &p; //return pointer to person. }
C# code:
person
In C++, that 'p' will live on the stack and thus get clobbered when the function returns. In C#, the garbage collector knows to not clobber it until the last reference is lost.
('clobber' being used loosely here... :p)