Skip to content

Commit

Permalink
bugfix: some ref targets are instantiated as owners
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Nov 5, 2024
1 parent b68a0c1 commit b30cf2d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class MotorcycleControllerSettings
public MotorcycleControllerSettings() {
super(false);
long settingsVa = createDefault();
setVirtualAddress(settingsVa, true);
setVirtualAddress(settingsVa, false); // not owner due to ref counting
}
// *************************************************************************
// native private methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class SoftBodySharedSettings
*/
public SoftBodySharedSettings() {
long settingsVa = createDefault();
setVirtualAddress(settingsVa, () -> free(settingsVa));
setVirtualAddress(settingsVa, null); // not owner due to ref counting
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TrackedVehicleControllerSettings
*/
public TrackedVehicleControllerSettings() {
long settingsVa = createDefault();
setVirtualAddress(settingsVa, true);
setVirtualAddress(settingsVa, false); // not owner due to ref counting
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class WheelSettingsTv extends WheelSettings {
public WheelSettingsTv() {
super(true);
long settingsVa = createDefault();
setVirtualAddress(settingsVa, true);
setVirtualAddress(settingsVa, false); // not owner due to ref counting
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class WheelSettingsWv extends WheelSettings {
public WheelSettingsWv() {
super(true);
long settingsVa = createDefault();
setVirtualAddress(settingsVa, true);
setVirtualAddress(settingsVa, false); // not owner due to ref counting
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class WheeledVehicleControllerSettings
*/
public WheeledVehicleControllerSettings() {
long settingsVa = createDefault();
setVirtualAddress(settingsVa, true);
setVirtualAddress(settingsVa, false); // not owner due to ref counting
}

/**
Expand Down

0 comments on commit b30cf2d

Please sign in to comment.