Fix CLR objects not being set as ptr owner (#55)

Signed-off-by: Ayane Satomi <ayane@vignetteapp.org>
This commit is contained in:
Ayase Minori
2023-04-16 07:30:02 +08:00
committed by GitHub
parent 176415561c
commit baf3fbd8ea
17 changed files with 17 additions and 17 deletions

View File

@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class Anchor3dVectorPacket : Packet<List<Anchor3d>>
{
public Anchor3dVectorPacket() : base() { }
public Anchor3dVectorPacket() : base(true) { }
public Anchor3dVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public Anchor3dVectorPacket(Anchor3d[] value) : base()
{

View File

@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class BoolPacket : Packet<bool>
{
public BoolPacket() : base() { }
public BoolPacket() : base(true) { }
public BoolPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public BoolPacket(bool value) : base()
{

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class ClassificationListPacket : Packet<ClassificationList>
{
public ClassificationListPacket() : base() { }
public ClassificationListPacket() : base(true) { }
public ClassificationListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public ClassificationListPacket? At(Timestamp timestamp) => At<ClassificationListPacket>(timestamp);

View File

@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class ClassificationListVectorPacket : Packet<List<ClassificationList>>
{
public ClassificationListVectorPacket() : base() { }
public ClassificationListVectorPacket() : base(true) { }
public ClassificationListVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public ClassificationListVectorPacket? At(Timestamp timestamp) => At<ClassificationListVectorPacket>(timestamp);

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class DetectionPacket : Packet<Detection>
{
public DetectionPacket() : base() { }
public DetectionPacket() : base(true) { }
public DetectionPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public DetectionPacket? At(Timestamp timestamp) => At<DetectionPacket>(timestamp);

View File

@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class DetectionVectorPacket : Packet<List<Detection>>
{
public DetectionVectorPacket() : base() { }
public DetectionVectorPacket() : base(true) { }
public DetectionVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public DetectionVectorPacket? At(Timestamp timestamp) => At<DetectionVectorPacket>(timestamp);

View File

@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class FaceGeometryPacket : Packet<FaceGeometry.FaceGeometry>
{
public FaceGeometryPacket() : base() { }
public FaceGeometryPacket() : base(true) { }
public FaceGeometryPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public FaceGeometryPacket? At(Timestamp timestamp) => At<FaceGeometryPacket>(timestamp);

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class FaceGeometryVectorPacket : Packet<List<FaceGeometry.FaceGeometry>>
{
public FaceGeometryVectorPacket() : base() { }
public FaceGeometryVectorPacket() : base(true) { }
public FaceGeometryVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public FaceGeometryVectorPacket? At(Timestamp timestamp) => At<FaceGeometryVectorPacket>(timestamp);

View File

@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class FloatPacket : Packet<float>
{
public FloatPacket() : base() { }
public FloatPacket() : base(true) { }
public FloatPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public FloatPacket(float value) : base()

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class FrameAnnotationPacket : Packet<FrameAnnotation>
{
public FrameAnnotationPacket() : base() { }
public FrameAnnotationPacket() : base(true) { }
public FrameAnnotationPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public FrameAnnotationPacket? At(Timestamp timestamp) => At<FrameAnnotationPacket>(timestamp);

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class GpuBufferPacket : Packet<GpuBuffer>
{
public GpuBufferPacket() : base() { }
public GpuBufferPacket() : base(true) { }
public GpuBufferPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public GpuBufferPacket? At(Timestamp timestamp) => At<GpuBufferPacket>(timestamp);

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class ImageFramePacket : Packet<ImageFrame>
{
public ImageFramePacket() : base() { }
public ImageFramePacket() : base(true) { }
public ImageFramePacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public ImageFramePacket(ImageFrame imageFrame) : base()

View File

@ -10,7 +10,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class IntPacket : Packet<int>
{
public IntPacket() : base() { }
public IntPacket() : base(true) { }
public IntPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public IntPacket(int value) : base()

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class LandmarkListPacket : Packet<LandmarkList>
{
public LandmarkListPacket() : base() { }
public LandmarkListPacket() : base(true) { }
public LandmarkListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public LandmarkListPacket? At(Timestamp timestamp) => At<LandmarkListPacket>(timestamp);

View File

@ -12,7 +12,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class MatrixPacket : Packet<MatrixData>
{
public MatrixPacket() : base() { }
public MatrixPacket() : base(true) { }
public MatrixPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public MatrixPacket(MatrixData matrixData) : base()

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class NormalizedLandmarkListPacket : Packet<NormalizedLandmarkList>
{
public NormalizedLandmarkListPacket() : base() { }
public NormalizedLandmarkListPacket() : base(true) { }
public NormalizedLandmarkListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public NormalizedLandmarkListPacket? At(Timestamp timestamp) => At<NormalizedLandmarkListPacket>(timestamp);

View File

@ -11,7 +11,7 @@ namespace Mediapipe.Net.Framework.Packets
{
public class NormalizedRectPacket : Packet<NormalizedRect>
{
public NormalizedRectPacket() : base() { }
public NormalizedRectPacket() : base(true) { }
public NormalizedRectPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) { }
public NormalizedRectPacket? At(Timestamp timestamp) => At<NormalizedRectPacket>(timestamp);