^ There is a bit of a caviat when it comes to minor moons of gas giants though (minor moons, as opposed to major ones, aren't large and massive enough for their gravity to make them spherical, so they're basically just asteroids captured by their host planets gravity, mostly).
The Roche Limit generally tends to be where the outer edge of a planet's rings are. However, some minor moons can actually exist within the rings, not too far away from the rings' outer edge. I don't quite completely understand it myself, but it's got something to do with such quirks of orbital mechanics like resonances. Said quirks also cause ring gaps, even if there is no moon in the ring gap, as these gaps are mostly formed by moons on a moderate distance from their host planet, outside the Roche Limit, having an orbital resonance with whatever few objects orbit within the ring gaps.