You can use OnBecameInvisible in the object’s script:
function OnBecameInvisible () {
Destroy(gameObject);
}
An object is considered visible when it’s inside the view angle (or frustum, to be more precise) of any camera - even if it’s hidden behind some object, mountain etc. When you run it in the Editor, the Scene camera is also taken in account, thus the object may be out of the Game view and still be considered visible. Other problems may occur if you use a high top down camera to create a map: the bullet will be destroyed only when it lefts the map.
Every renderer has a variable called isVisible which will return true if the renderer is visible to any camera, and false otherwise. Adding a simple if statement like
if (!renderer.isVisible) {
Destroy(gameObject);
}
would destroy the gameObject the moment it is not visible by the camera.