Here's some notions about the annoying out of memory crashes that I, and many others are plagued by. I think it's only Enders, but maybe vanilla has them too. I never could stand to run that long enough to see if it crashes.
Some observations:
- every single object has a memory leak. Some objects leak more than others (cotton fields, windmill animation).
- shadows count as object for this purpose too.
- loading a new map (by entering /exiting a building or teleport) does not clear the memory leak, it keeps accumulating. Since a new busy map will give it rather large shot of new objects to leak from, a lot of crashes seem to appear after a reload.
- Those spots on the map that will cause your minimap to update when crossing them are also notorious for pushing you over the OOM edge.
Tips to minimize crashing:
- downgrade from Java7 to Java6. I heard from some people, that this doesn't work anymore, and I am too stubborn myself to 'downgrade', but it might be worth a try for you.
- turn off shadows. Reduce crashes to half.
- don't build (many) windmills
- minimize cotton planting, or make a separate base just for planting cotton, so it doesn't lag your main base.
Most annoying crashes
1) crash in PvP, lose your char.
2) crash while walking in between a gate. Makes you drop all your stuff, and most of that will drop under the gate / walls and be unretrievable
3) crash in a canoe or a boat. About 50% of the time, you will not be able to log back into where you crashed, causing you to lose your inventory to the water, and having to find your boat back, starting from your bind.
4) crash in a canoe / boat, while carrying a boat. Boat will despawn, and be lost forever.
5) crash while being aggro'd by argopelter. Unless you have really high biles and log back in real quick, you're at the mercy of the argopelter, and anyone stumbling upon your argo-locked comateuse avatar.
How to prevent annoyances
1) Always, always exit the program, and start with a fresh client, before engaging in PvP
2) When walking through a gate, stand in front of it first, make sure you have a clear path all the way through, and execute one single click move order all the way through the gate. If you crash, you will not lose stuff, because on diconnecting, the character will still finish the command it was executing, in this case, walk to the point where you clicked (which is not in between the gate, but already through it)
3) before going on a canoe / boat trip, exit program and restart. On long trips, peridoically exit restart.
4) Don't carry a boat while in a canoe.
5) Exit restart before engaging argopelters.