A better way that mimics old fashioned 'whitewashing'
Farm, dairy and food industries for centuries used caustics to keep mold and fungus and mold under control. Our ancestors 'whitewashed' just about everything for the same purpose. Whitewashing is a caustic compound that will not permit mold spores, mildew or fungus to grow. Get some strong inorganic *caustic* detergent (sodium silicate, TSP --- dissolve the TSP in water, etc.) and simply spray on the surfaces and let dry. Dont apply to finely painted or varnished surfaces (or bare teak) as it may lift the coatings. Bilge paint, fiberglass, etc. is oK to coat, just dont 'soak' the stuff, just a 'light' fine spray. For cleaning mold mildew, such 'caustics' (including lye based detergents) will dissolve and liquify the fungal cells. Caution: when using strong caustic detergents be sure to wear gloves and goggles .... as caustics will also dissolve your skin, eyeballs, etc. If you cant find any inorganic caustic detergent simply go to a farm supply (Agway, etc.) and buy some old fashioned 'lye soap', put it into a jar with some water and let dissolve ..... then spray on the liquid. Molds and fungus THRIVE in acidic atmospheres .... NO to the vinegar as that will create a slightly acidic atmosphere where molds 'thrive'. If your boat is to be long term stored, to prevent mildew, etc. get some paraformaldehyde crystals, put in plastic trays and quickly leave the boat. The gas from paraformaldehyde will kill the mold, mildew and their spores. Paraformaldehyde is not compatible with human lung tissue, so be sure let the boat air out completely when returning and before you go below.