it was a chemical device.
the canister contained a chemical called calcium hydride that reacted with sea water and formed a mass of bubbles. (think of a giant alka-seltzer tablet)
not only would the bubbles produce a slight noise that would possibly capture the interest of a hydrophone listener... more importantly, the large cavity of bubbles would reflect active sonar pings as if they were a solid object.
in theory the return would be larger or similar in size to the u-boat. so... the destroyer would either attack the bubbles or would be faced with the decision of which "echo" to attack.
EDIT: to summarize... they were more to fool active sonar pings than to create a noise cavitation.
__________________
|