From baf3fbd8ea87144f03a93bac6abf444b2bb20a21 Mon Sep 17 00:00:00 2001 From: Ayase Minori Date: Sun, 16 Apr 2023 07:30:02 +0800 Subject: [PATCH] Fix CLR objects not being set as ptr owner (#55) Signed-off-by: Ayane Satomi --- Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/BoolPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/ClassificationListPacket.cs | 2 +- .../Framework/Packets/ClassificationListVectorPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/DetectionPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/FaceGeometryVectorPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/FloatPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/ImageFramePacket.cs | 2 +- Mediapipe.Net/Framework/Packets/IntPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/MatrixPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/NormalizedLandmarkListPacket.cs | 2 +- Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs b/Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs index cc6450b..315659e 100644 --- a/Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs +++ b/Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs @@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets { public class Anchor3dVectorPacket : Packet> { - public Anchor3dVectorPacket() : base() { } + public Anchor3dVectorPacket() : base(true) { } public Anchor3dVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public Anchor3dVectorPacket(Anchor3d[] value) : base() { diff --git a/Mediapipe.Net/Framework/Packets/BoolPacket.cs b/Mediapipe.Net/Framework/Packets/BoolPacket.cs index 48e99d6..042a4fc 100644 --- a/Mediapipe.Net/Framework/Packets/BoolPacket.cs +++ b/Mediapipe.Net/Framework/Packets/BoolPacket.cs @@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets { public class BoolPacket : Packet { - public BoolPacket() : base() { } + public BoolPacket() : base(true) { } public BoolPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public BoolPacket(bool value) : base() { diff --git a/Mediapipe.Net/Framework/Packets/ClassificationListPacket.cs b/Mediapipe.Net/Framework/Packets/ClassificationListPacket.cs index 22a49ba..db9eeb0 100644 --- a/Mediapipe.Net/Framework/Packets/ClassificationListPacket.cs +++ b/Mediapipe.Net/Framework/Packets/ClassificationListPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class ClassificationListPacket : Packet { - public ClassificationListPacket() : base() { } + public ClassificationListPacket() : base(true) { } public ClassificationListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public ClassificationListPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/ClassificationListVectorPacket.cs b/Mediapipe.Net/Framework/Packets/ClassificationListVectorPacket.cs index 7342604..691f11e 100644 --- a/Mediapipe.Net/Framework/Packets/ClassificationListVectorPacket.cs +++ b/Mediapipe.Net/Framework/Packets/ClassificationListVectorPacket.cs @@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets { public class ClassificationListVectorPacket : Packet> { - public ClassificationListVectorPacket() : base() { } + public ClassificationListVectorPacket() : base(true) { } public ClassificationListVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public ClassificationListVectorPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/DetectionPacket.cs b/Mediapipe.Net/Framework/Packets/DetectionPacket.cs index d2ad1b5..80528c3 100644 --- a/Mediapipe.Net/Framework/Packets/DetectionPacket.cs +++ b/Mediapipe.Net/Framework/Packets/DetectionPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class DetectionPacket : Packet { - public DetectionPacket() : base() { } + public DetectionPacket() : base(true) { } public DetectionPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public DetectionPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs b/Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs index d6d0d39..68e8a5a 100644 --- a/Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs +++ b/Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs @@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets { public class DetectionVectorPacket : Packet> { - public DetectionVectorPacket() : base() { } + public DetectionVectorPacket() : base(true) { } public DetectionVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public DetectionVectorPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs b/Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs index 494ac80..4a00ce3 100644 --- a/Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs +++ b/Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs @@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets { public class FaceGeometryPacket : Packet { - public FaceGeometryPacket() : base() { } + public FaceGeometryPacket() : base(true) { } public FaceGeometryPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public FaceGeometryPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/FaceGeometryVectorPacket.cs b/Mediapipe.Net/Framework/Packets/FaceGeometryVectorPacket.cs index 3302e71..b510a51 100644 --- a/Mediapipe.Net/Framework/Packets/FaceGeometryVectorPacket.cs +++ b/Mediapipe.Net/Framework/Packets/FaceGeometryVectorPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class FaceGeometryVectorPacket : Packet> { - public FaceGeometryVectorPacket() : base() { } + public FaceGeometryVectorPacket() : base(true) { } public FaceGeometryVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public FaceGeometryVectorPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/FloatPacket.cs b/Mediapipe.Net/Framework/Packets/FloatPacket.cs index 26eac5c..fee307a 100644 --- a/Mediapipe.Net/Framework/Packets/FloatPacket.cs +++ b/Mediapipe.Net/Framework/Packets/FloatPacket.cs @@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets { public class FloatPacket : Packet { - public FloatPacket() : base() { } + public FloatPacket() : base(true) { } public FloatPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public FloatPacket(float value) : base() diff --git a/Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs b/Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs index acdb33f..841d59c 100644 --- a/Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs +++ b/Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class FrameAnnotationPacket : Packet { - public FrameAnnotationPacket() : base() { } + public FrameAnnotationPacket() : base(true) { } public FrameAnnotationPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public FrameAnnotationPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs b/Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs index faf43db..0337f7f 100644 --- a/Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs +++ b/Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class GpuBufferPacket : Packet { - public GpuBufferPacket() : base() { } + public GpuBufferPacket() : base(true) { } public GpuBufferPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public GpuBufferPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/ImageFramePacket.cs b/Mediapipe.Net/Framework/Packets/ImageFramePacket.cs index 9e5198c..7490c9e 100644 --- a/Mediapipe.Net/Framework/Packets/ImageFramePacket.cs +++ b/Mediapipe.Net/Framework/Packets/ImageFramePacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class ImageFramePacket : Packet { - public ImageFramePacket() : base() { } + public ImageFramePacket() : base(true) { } public ImageFramePacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public ImageFramePacket(ImageFrame imageFrame) : base() diff --git a/Mediapipe.Net/Framework/Packets/IntPacket.cs b/Mediapipe.Net/Framework/Packets/IntPacket.cs index 84b652e..9d0fac2 100644 --- a/Mediapipe.Net/Framework/Packets/IntPacket.cs +++ b/Mediapipe.Net/Framework/Packets/IntPacket.cs @@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets { public class IntPacket : Packet { - public IntPacket() : base() { } + public IntPacket() : base(true) { } public IntPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public IntPacket(int value) : base() diff --git a/Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs b/Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs index 145722e..b39deb3 100644 --- a/Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs +++ b/Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class LandmarkListPacket : Packet { - public LandmarkListPacket() : base() { } + public LandmarkListPacket() : base(true) { } public LandmarkListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public LandmarkListPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/MatrixPacket.cs b/Mediapipe.Net/Framework/Packets/MatrixPacket.cs index 9a2c241..72469be 100644 --- a/Mediapipe.Net/Framework/Packets/MatrixPacket.cs +++ b/Mediapipe.Net/Framework/Packets/MatrixPacket.cs @@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets { public class MatrixPacket : Packet { - public MatrixPacket() : base() { } + public MatrixPacket() : base(true) { } public MatrixPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public MatrixPacket(MatrixData matrixData) : base() diff --git a/Mediapipe.Net/Framework/Packets/NormalizedLandmarkListPacket.cs b/Mediapipe.Net/Framework/Packets/NormalizedLandmarkListPacket.cs index 02aa022..ea9aa59 100644 --- a/Mediapipe.Net/Framework/Packets/NormalizedLandmarkListPacket.cs +++ b/Mediapipe.Net/Framework/Packets/NormalizedLandmarkListPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class NormalizedLandmarkListPacket : Packet { - public NormalizedLandmarkListPacket() : base() { } + public NormalizedLandmarkListPacket() : base(true) { } public NormalizedLandmarkListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public NormalizedLandmarkListPacket? At(Timestamp timestamp) => At(timestamp); diff --git a/Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs b/Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs index ced27e8..873d830 100644 --- a/Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs +++ b/Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs @@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets { public class NormalizedRectPacket : Packet { - public NormalizedRectPacket() : base() { } + public NormalizedRectPacket() : base(true) { } public NormalizedRectPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { } public NormalizedRectPacket? At(Timestamp timestamp) => At(timestamp);