From the “You learn something new every day” department: Fluid Identity • Damn Interesting
When a caterpillar enters the chrysalis stage, it is not merely sprouting wings to become a moth or butterfly. Enzymes inside the chrysalis completely dissolve the entire caterpillar–brain, organs, and all–into a nutrient-rich slurry of protein. Only a few cells remain alive. Once the caterpillar has self-digested, an alternate section of DNA inside the few remaining living cells is expressed, and the cells use the nutrient soup to multiply and develop the new organism. In essence the animal is a chimera; the caterpillar lives and dies, and an entirely new organism emerges from its remains.
Astonishingly, in spite of the radical liquefication of the original organism and its entire nervous system, some memories survive the transition.
I never knew this about insect metamorphosis, and found this article Damn Interesting.