Crustaceans conserve minerals when moulting by absorbing calcium carbonate from their shell before it is shed.
"The external shell gives the crustaceans the problem it gave the trilobites. It will not expand and since it completely encloses their bodies, the only way they can grow is to shed it periodically. As the time for the moult approaches, the animal absorbs much of the calcium carbonate from its shell into its blood. It secretes a new, soft wrinkled skin beneath the shell. The outgrown armour splits and the animal pulls itself out, leaving it more or less complete, like a translucent ghost of its former self. Now its skin is soft and it must hide, but it grows fast and swells its body by absorbing water and stretching out the wrinkles of its new carapace. Gradually this hardens and the animal can again venture into a hostile world." (Attenborough 1979:58)
Learn more about this functional adaptation.