This can be tested by placing this code in the init line of a manned static weapon:
0 = [this] spawn { _gun = _this select 0; while {true} do { _poslist = (_gun emptyPositions "gunner"); hint str _poslist; sleep 1;} };
This will continually display a hint showing the weapon's available gunner slots, which will initially be 0 because the weapon is manned. If you then kill the gunner, the hint will still show 0 as if a gunner is still manning the weapon. At this point, if you enter and then eject from the weapon, the position will be reset and the hint will display '1', meaning the weapon is now considered to be empty.