1) Hold the power button until the power-down slider shows up
2) Hold the home button until the application exists
As for your approach: I've seen that fail for locked up apps. I believe that sends a normal quit signal instead of force terminating the app.