Skip to content

Commit b4c1f2b

Browse files
committed
add Dispose(bool) + call from Dispose()
1 parent 66f8d82 commit b4c1f2b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Packages/com.unity.formats.fbx/Editor/Scripts/FbxExporter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3923,6 +3923,12 @@ bool ExportMesh (GameObject gameObject, FbxNode fbxNode)
39233923
/// Clean up this class on garbage collection
39243924
/// </summary>
39253925
public void Dispose ()
3926+
{
3927+
Dispose(true);
3928+
System.GC.SuppressFinalize(this);
3929+
}
3930+
3931+
protected virtual void Dispose(bool cleanUpManaged)
39263932
{
39273933
}
39283934

Packages/com.unity.formats.fbx/Editor/Scripts/FbxRotationCurve.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,16 @@ public FbxAnimCurveModifyHelper(List<FbxAnimCurve> list)
224224
}
225225

226226
~FbxAnimCurveModifyHelper() {
227-
Dispose();
227+
Dispose(false);
228228
}
229229

230230
public void Dispose()
231+
{
232+
Dispose(true);
233+
System.GC.SuppressFinalize(this);
234+
}
235+
236+
public virtual void Dispose(bool cleanUpManaged)
231237
{
232238
foreach (var curve in Curves)
233239
curve.KeyModifyEnd();

0 commit comments

Comments
 (0)