diff --git a/src/main/java/com/github/stephengold/joltjni/VehicleTransmissionSettings.java b/src/main/java/com/github/stephengold/joltjni/VehicleTransmissionSettings.java index d8779c0..0e29d3a 100644 --- a/src/main/java/com/github/stephengold/joltjni/VehicleTransmissionSettings.java +++ b/src/main/java/com/github/stephengold/joltjni/VehicleTransmissionSettings.java @@ -30,14 +30,6 @@ of this software and associated documentation files (the "Software"), to deal * @author Stephen Gold sgold@sonic.net */ public class VehicleTransmissionSettings extends JoltPhysicsObject { - // ************************************************************************* - // fields - - /** - * prevent premature garbage collection of the underlying - * {@code WheeledVehicleControllerSettings} - */ - final private WheeledVehicleControllerSettings vehicle; // ************************************************************************* // constructors @@ -45,14 +37,13 @@ public class VehicleTransmissionSettings extends JoltPhysicsObject { * Instantiate a settings with the specified native object assigned but not * owned. * - * @param vehicle the underlying {@code WheeledVehicleControllerSettings} + * @param vehicle the containing object, or {@code null} if none * @param settingsVa the virtual address of the native object to assign (not * zero) */ VehicleTransmissionSettings( WheeledVehicleControllerSettings vehicle, long settingsVa) { - this.vehicle = vehicle; - setVirtualAddress(settingsVa, null); + super(vehicle, settingsVa); } // ************************************************************************* // new methods exposed