One useful thing, is that you can NSLog the retaincount, so that you can do testing on your own.
But back to your question...
IF MyView is a property, and you had referenced it with self.MyView and it was declared with retain or copy, your 2 statements are the same. If MyView is just a local variable, your UIView will dealloc when you do
[temp release];
because you have done nothing to increase the retain count since you alloced it.
For your string example...
[NSString stringWithString:@"Hello"];
returns an autoreleased string. if you will need to keep it for a very long time, you'll want to put a retain on it.
The second string example is a statically allocated string, and you do not have to worry about it. retain counts don't apply to them.