a leak detector and shut - off apparatus shuts off hydraulic fluid downstreamo prevent the hazards attendant hydraulic failure such as loss of fluid and fire . a first sensor is coupled to a supply line for hydraulic fluid to produce pressure differential force f s , which is representative of the flow of hydraulic fluid . a second sensor is coupled to a return line for hydraulic fluid to produce pressure differential force f r that is representative of flow of hydraulic fluid . a compensator creates representation f c of the rate of accumulation of hydraulic fluid in the hydraulic circuit downstream of the device and a safety margin . a shutoff mechanism is connected to the first and second sensors and the compensator to shut off the supply and return lines when f s is greater than the sum of f r and f c . mechanical and electrical designs shutoff or isolate downstream hydraulic actuators , branches or select components immediately when a leak is detected to prevent loss of fluid and to reduce the hazards of fire .