Created
October 6, 2013 19:47
-
-
Save nberardi/6858300 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public unsafe class NSDataStream : UnmanagedMemoryStream | |
{ | |
public NSDataStream(NSData data) | |
: base((byte*)data.Bytes, data.Length) | |
{ | |
_data = data; | |
} | |
private readonly NSData _data; | |
protected override void Dispose(bool disposing) | |
{ | |
if (disposing) | |
_data.Dispose(); | |
base.Dispose(disposing); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment