Skip to content

Commit

Permalink
Fix CLR objects not being set as ptr owner (#55)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayane Satomi <ayane@vignetteapp.org>
  • Loading branch information
sr229 authored Apr 15, 2023
1 parent 1764155 commit baf3fbd
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/Anchor3DVectorPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/BoolPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/DetectionPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/DetectionVectorPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/FaceGeometryPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/FloatPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/FrameAnnotationPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/GpuBufferPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/ImageFramePacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/IntPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/LandmarkListPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/MatrixPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Mediapipe.Net/Framework/Packets/NormalizedRectPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit baf3fbd

Please sign in to comment.