protected void clearCaches() {
        if (leftNeighbour != null) {
            leftNeighbour.rightNeighbour = null;
            leftNeighbour = null;
        }
        if (rightNeighbour != null) {
            rightNeighbour.leftNeighbour = null;
            rightNeighbour = null;
        }
        if (topNeighbour != null) {
            topNeighbour.bottomNeighbour = null;
            topNeighbour = null;
        }
        if (bottomNeighbour != null) {
            bottomNeighbour.topNeighbour = null;
            bottomNeighbour = null;
        }
    }
Removes any references when the terrain is being removed.
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainPatch.java