So you must read it inside a method or procedure, otherwise the stack allocations go out of scope / is released on exit?
The lifetime of the values read that way varies significantly in just about all cases. What you pointed out is right, reading local variables, the memory will still be accessible after the function/procedure returns (the stack memory isn't released back to the O/S when a function/procedure returns) but, the contents of those locations will vary in unpredictable ways.
The same thing is true when reading another process' memory. It's rather important to be very aware of _what_ is being read because the lifetime of the values may be ephemeral and even the lifetime of the memory block itself may be ephemeral.
For instance, a process can read the first page of the csrss.exe process with confidence that it will be there (if csrss.exe crashes, Windows crashes) but, reading the first page of a run of the mill user process is a different proposition. The process may not be there by the time the read is issued or by the time it has completed.