Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,18 @@ MIN_TVOS_SIMULATOR_VERSION=16.0
# These are the simulator package ids for the versions above
EXTRA_SIMULATORS=iOS:MIN_IOS_SIMULATOR_VERSION tvOS:MIN_TVOS_SIMULATOR_VERSION

ifeq ($(ONLY_SHARPIE),)
ifneq ($(filter $(CURRENT_BRANCH),release/sharpie release-test/only-sharpie),)
ONLY_SHARPIE=1
endif
endif

ifndef ONLY_SHARPIE
INCLUDE_IOS=1
INCLUDE_MAC=1
INCLUDE_TVOS=1
INCLUDE_MACCATALYST=1
endif

INCLUDE_SIMULATOR=1
INCLUDE_DEVICE=1
Expand Down Expand Up @@ -350,6 +358,8 @@ else
$(error "The variable XCODE_IS_STABLE is not set!")
endif
$(Q) printf "\t\t<TRACKING_DOTNET_RUNTIME_SEPARATELY>$(TRACKING_DOTNET_RUNTIME_SEPARATELY)</TRACKING_DOTNET_RUNTIME_SEPARATELY>\n" >> $@.tmp
$(Q) printf "\t\t<CURRENT_BRANCH>$(CURRENT_BRANCH)</CURRENT_BRANCH>\n" >> $@.tmp
$(Q) printf "\t\t<CURRENT_HASH_LONG>$(CURRENT_HASH_LONG)</CURRENT_HASH_LONG>\n" >> $@.tmp
$(Q) printf "\t</PropertyGroup>\n" >> $@.tmp
$(Q) printf "</Project>\n" >> $@.tmp
$(Q) mv $@.tmp $@
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ ifndef IS_LINUX
SUBDIRS += runtime
endif

SUBDIRS += src msbuild tools
SUBDIRS += src

ifndef ONLY_SHARPIE
SUBDIRS += msbuild
endif

SUBDIRS += tools

ifndef IS_LINUX
SUBDIRS += dotnet
Expand Down
3 changes: 3 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-macios -->
<add key="darc-pub-dotnet-macios-f97742b" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-macios-f97742bf/nuget/v3/index.json" />
<add key="darc-pub-dotnet-macios-2634d0a" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-macios-2634d0ae/nuget/v3/index.json" />
<add key="darc-pub-dotnet-macios-dcec94e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-macios-dcec94e3/nuget/v3/index.json" />
<add key="darc-pub-dotnet-macios-230d811" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-macios-230d811b/nuget/v3/index.json" />
<add key="darc-pub-dotnet-macios-42038e1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-macios-42038e18/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-macios -->
<!-- Begin: Package sources from xamarin-xamarin-macios -->
<!-- End: Package sources from xamarin-xamarin-macios -->
Expand Down
10 changes: 10 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Usage: configure [options]
--enable-xamarin
--disable-xamarin Enable/disable additional Xamarin-specific parts of the build.

--only-sharpie Only build Objective-Sharpie. This is on by default for the branch 'release/sharpie', and disabled otherwise.

--custom-dotnet=[dotnet/runtime] Use a locally built version of dotnet/runtime. Pass the path to an already build checkout of dotnet/runtime. See docs/CORECLR.md for detailed instructions about how to build dotnet/runtime from source.

--ignore-unknown-params alters the default behavior to not return an non-zero exit code when an unknown parameter is provided.
Expand Down Expand Up @@ -134,6 +136,14 @@ while test "x$1" != x; do
echo "INCLUDE_SIMULATOR=" >> "$CONFIGURED_FILE"
shift
;;
--only-sharpie)
echo "ONLY_SHARPIE=1" >> "$CONFIGURED_FILE"
echo "INCLUDE_MAC=" >> $CONFIGURED_FILE
echo "INCLUDE_IOS=" >> $CONFIGURED_FILE
echo "INCLUDE_TVOS=" >> $CONFIGURED_FILE
echo "INCLUDE_MACCATALYST=" >> $CONFIGURED_FILE
shift
;;
--ignore-unknown-params)
echo "ignoring unknown parameters"
IGNORE_UNKNOWN_PARAMS=true
Expand Down
10 changes: 10 additions & 0 deletions dotnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,15 @@ Microsoft.$1.Sdk/targets/Microsoft.$1.Sdk.Versions.props: targets/Microsoft.$1.S
endef
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call VersionsTemplate,$(platform),$(shell echo $(platform) | tr a-z A-Z),$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS),$(shell echo $(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS) | tr ' ' ';'),$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS_NO_ARCH))))

# When building only sharpie, generate iOS version props so setup-publish-bar-manifest works for DARC
ifdef ONLY_SHARPIE
$(eval $(call VersionsTemplate,iOS,IOS,,,ios))
endif

version-props: $(foreach platform,$(DOTNET_PLATFORMS),targets/Microsoft.$(platform).Sdk.Versions.props)
ifdef ONLY_SHARPIE
version-props: targets/Microsoft.iOS.Sdk.Versions.props
endif

setup-publish-bar-manifest: version-props
echo \#\#vso[task.setvariable variable=PrereleaseIdentifier]$(NUGET_PRERELEASE_IDENTIFIER)
Expand Down Expand Up @@ -466,7 +474,9 @@ NUGET_SOURCES:=$(shell grep https://pkgs.dev.azure.com $(TOP)/NuGet.config | sed
$(foreach platform,$(DOTNET_PLATFORMS),$(shell echo $(platform) | tr A-Z a-z))
$(Q) touch $@

ifndef ONLY_SHARPIE
TARGETS += .stamp-install-workloads
endif

TARGETS += $(WORKLOAD_TARGETS) $(WINDOWS_PACKAGE_TARGETS)

Expand Down
4 changes: 2 additions & 2 deletions dotnet/targets/Xamarin.Shared.Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<_MobilePropsPath>$(_MobilePropsDir)$(MSBuildProjectName).mobile.props</_MobilePropsPath>
</PropertyGroup>

<!-- Imports the .mobile.props file if exists and the build is from VS -->
<Import Project="$(_MobilePropsPath)" Condition="Exists('$(_MobilePropsPath)') And '$(BuildingInsideVisualStudio)' == 'true'" />
<!-- Imports the .mobile.props file if exists and the build is from VS/VSCode -->
<Import Project="$(_MobilePropsPath)" Condition="Exists('$(_MobilePropsPath)') And ('$(BuildingInsideVisualStudio)' == 'true' Or '$(DesignTimeBuild)' == 'true')" />

<PropertyGroup>
<!-- Set to true when using the Microsoft.<platform>.Sdk NuGet. This is used by pre-existing/shared targets to tweak behavior depending on build system -->
Expand Down
10 changes: 5 additions & 5 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ This file should be imported by eng/Versions.props
<MicrosoftTemplateEngineAuthoringTasksPackageVersion>11.0.100-preview.3.26153.109</MicrosoftTemplateEngineAuthoringTasksPackageVersion>
<!-- dotnet/macios dependencies -->
<MicrosoftiOSSdknet100_260PackageVersion>26.0.11017</MicrosoftiOSSdknet100_260PackageVersion>
<MicrosoftiOSSdknet100_262PackageVersion>26.2.10219</MicrosoftiOSSdknet100_262PackageVersion>
<MicrosoftiOSSdknet100_262PackageVersion>26.2.10218</MicrosoftiOSSdknet100_262PackageVersion>
<MicrosoftMacCatalystSdknet100_260PackageVersion>26.0.11017</MicrosoftMacCatalystSdknet100_260PackageVersion>
<MicrosoftMacCatalystSdknet100_262PackageVersion>26.2.10219</MicrosoftMacCatalystSdknet100_262PackageVersion>
<MicrosoftMacCatalystSdknet100_262PackageVersion>26.2.10218</MicrosoftMacCatalystSdknet100_262PackageVersion>
<MicrosoftmacOSSdknet100_260PackageVersion>26.0.11017</MicrosoftmacOSSdknet100_260PackageVersion>
<MicrosoftmacOSSdknet100_262PackageVersion>26.2.10219</MicrosoftmacOSSdknet100_262PackageVersion>
<MicrosoftmacOSSdknet100_262PackageVersion>26.2.10218</MicrosoftmacOSSdknet100_262PackageVersion>
<MicrosofttvOSSdknet100_260PackageVersion>26.0.11017</MicrosofttvOSSdknet100_260PackageVersion>
<MicrosofttvOSSdknet100_262PackageVersion>26.2.10219</MicrosofttvOSSdknet100_262PackageVersion>
<MicrosofttvOSSdknet100_262PackageVersion>26.2.10218</MicrosofttvOSSdknet100_262PackageVersion>
<!-- dotnet/xharness dependencies -->
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>10.0.0-prerelease.25516.4</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>11.0.0-prerelease.26117.1</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
</PropertyGroup>
<!--Property group for alternate package version names-->
<PropertyGroup>
Expand Down
35 changes: 33 additions & 2 deletions scripts/create-windows-html-report/create-windows-html-report.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public static int Main (string [] args)

var indexContents = new StringBuilder ();
var summaryContents = new StringBuilder ();
var allFailedTests = new List<(string TrxName, TrxParser.TrxTestResult Test)> ();
var failedTrxNames = new List<string> ();
var passedTrxCount = 0;
var failedTrxCount = 0;

indexContents.AppendLine ($"<!DOCTYPE html>");
indexContents.AppendLine ($"<html>");
Expand Down Expand Up @@ -123,9 +127,12 @@ public static int Main (string [] args)
var name = trx.Name;
var path = trx.TestResults;
var messageLines = new List<string> ();
var trxSucceeded = true;

if (TrxParser.TryParseTrxFile (path, out var failedTests, out var outcome, out allTestsSucceeded, out var ex)) {
if (TrxParser.TryParseTrxFile (path, out var failedTests, out var outcome, out trxSucceeded, out var ex)) {
if (failedTests?.Any () == true) {
foreach (var ft in failedTests)
allFailedTests.Add ((name, ft));
messageLines.Add (" <ul>");
foreach (var ft in failedTests) {
var testName = ft.Name;
Expand All @@ -152,7 +159,15 @@ public static int Main (string [] args)
outcome = "Failed to parse test results";
if (ex is not null)
messageLines.Add ($"<div>{FormatHtml (ex.ToString ())}</div>");
trxSucceeded = false;
}

if (!trxSucceeded) {
allTestsSucceeded = false;
failedTrxNames.Add (name);
failedTrxCount++;
} else {
passedTrxCount++;
}

try {
Expand Down Expand Up @@ -194,7 +209,23 @@ public static int Main (string [] args)
if (allTestsSucceeded) {
summaryContents.AppendLine ($"# :tada: All {trxFiles.Length} tests passed :tada:");
} else {
summaryContents.AppendLine ($"# :tada: All {trxFiles.Length} tests passed :tada:");
summaryContents.AppendLine ("# Test results");
summaryContents.AppendLine ("<details>");
summaryContents.AppendLine ($"<summary>{failedTrxCount} tests failed, {passedTrxCount} tests passed.</summary>");
summaryContents.AppendLine ();
summaryContents.AppendLine ("## Failed tests");
summaryContents.AppendLine ();
if (allFailedTests.Any ()) {
foreach (var (trxName, test) in allFailedTests) {
var msg = string.IsNullOrEmpty (test.Message) ? "" : $": {test.Message.Split ('\n') [0]}";
summaryContents.AppendLine ($" * {trxName}/{test.Name}: {test.Outcome}{msg}");
}
} else {
foreach (var trxName in failedTrxNames) {
summaryContents.AppendLine ($" * {trxName}: Failed");
}
}
summaryContents.AppendLine ("</details>");
}

Directory.CreateDirectory (outputDirectory);
Expand Down
9 changes: 8 additions & 1 deletion scripts/generate-vs-workload/generate-vs-workload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@
writer.WriteLine ($" <TargetName>{allPlatforms}.{tfm}.{xcodeName}</TargetName>");
// Find the iOS version, otherwise use the version of the first platform listed.
var iOSPlatform = platforms.Where (v => v.Item1 == "iOS");
var manifestBuildVersion = iOSPlatform.Any () ? iOSPlatform.First ().Item2 : platforms.First ().Item2;
string manifestBuildVersion;
if (iOSPlatform.Any ()) {
manifestBuildVersion = iOSPlatform.First ().Item2;
} else if (platforms.Any ()) {
manifestBuildVersion = platforms.First ().Item2;
} else {
manifestBuildVersion = "0.0.1"; // happens when building only sharpie
}
writer.WriteLine ($" <ManifestBuildVersion>{manifestBuildVersion}</ManifestBuildVersion>");
writer.WriteLine ($" <EnableSideBySideManifests>true</EnableSideBySideManifests>");
writer.WriteLine ($" <UseVisualStudioComponentPrefix>false</UseVisualStudioComponentPrefix>");
Expand Down
4 changes: 2 additions & 2 deletions src/AddressBook/ABAddressBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public ABGroup [] GetGroups (ABRecord source)
if (label is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (label));

string? result = CFString.FromHandle (ABAddressBookCopyLocalizedLabel (label.Handle));
string? result = CFString.FromHandle (ABAddressBookCopyLocalizedLabel (label.Handle), true);
GC.KeepAlive (label);
return result;
}
Expand Down Expand Up @@ -754,7 +754,7 @@ public ABPerson [] GetPeopleWithName (string name)
var h = ABAddressBookCopyDefaultSource (GetCheckedHandle ());
if (h == IntPtr.Zero)
return null;
return new ABSource (h, this);
return new ABSource (h, true) { AddressBook = this };
}

[DllImport (Constants.AddressBookLibrary)]
Expand Down
4 changes: 2 additions & 2 deletions src/AddressBook/ABMultiValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public T Value {
public NSString? Label {
get {
AssertValid ();
return Runtime.GetNSObject<NSString> (ABMultiValue.CopyLabelAtIndex (self.Handle, index));
return Runtime.GetNSObject<NSString> (ABMultiValue.CopyLabelAtIndex (self.Handle, index), true);
}
set {
if (IsReadOnly)
Expand Down Expand Up @@ -319,7 +319,7 @@ public ABPropertyType PropertyType {
/// </remarks>
public T [] GetValues ()
{
return NSArray.ArrayFromHandle (ABMultiValue.CopyArrayOfAllValues (Handle), toManaged)
return NSArray.ArrayFromHandle (ABMultiValue.CopyArrayOfAllValues (Handle), toManaged, releaseHandle: true)
?? Array.Empty<T> ();
}

Expand Down
12 changes: 6 additions & 6 deletions src/AddressBook/ABPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ public int CompareTo (ABPerson other, ABPersonSortBy ordering)
/// </remarks>
public static string? LocalizedPropertyName (ABPersonProperty property)
{
return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (ABPersonPropertyId.ToId (property)));
return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (ABPersonPropertyId.ToId (property)), true);
}

/// <param name="propertyId">A value that corresponds to one of the low-level kABPersonProperty fields.
Expand All @@ -946,7 +946,7 @@ public int CompareTo (ABPerson other, ABPersonSortBy ordering)
/// </remarks>
public static string? LocalizedPropertyName (int propertyId)
{
return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (propertyId));
return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (propertyId), true);
}

[DllImport (Constants.AddressBookLibrary)]
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public static ABPropertyType GetPropertyType (int propertyId)
/// <altmember cref="AddressBook.ABPerson.HasImage" />
/// <altmember cref="AddressBook.ABPerson.RemoveImage" />
public NSData? Image {
get { return Runtime.GetNSObject<NSData> (ABPersonCopyImageData (Handle)); }
get { return Runtime.GetNSObject<NSData> (ABPersonCopyImageData (Handle), true); }
set {
IntPtr error;
unsafe {
Expand Down Expand Up @@ -1744,7 +1744,7 @@ public void SetRelatedNames (ABMultiValue<string>? value)
public ABPerson? []? GetLinkedPeople ()
{
var linked = ABPersonCopyArrayOfAllLinkedPeople (Handle);
return NSArray.ArrayFromHandle (linked, l => new ABPerson (l, null));
return NSArray.ArrayFromHandle (linked, l => new ABPerson (l, null), releaseHandle: true);
}

[DllImport (Constants.AddressBookLibrary)]
Expand All @@ -1756,7 +1756,7 @@ public void SetRelatedNames (ABMultiValue<string>? value)
/// <remarks>To be added.</remarks>
public NSData? GetImage (ABPersonImageFormat format)
{
return Runtime.GetNSObject<NSData> (ABPersonCopyImageDataWithFormat (Handle, (nint) (long) format));
return Runtime.GetNSObject<NSData> (ABPersonCopyImageDataWithFormat (Handle, (nint) (long) format), true);
}

[DllImport (Constants.AddressBookLibrary)]
Expand Down Expand Up @@ -1799,7 +1799,7 @@ public void SetRelatedNames (ABMultiValue<string>? value)
GC.KeepAlive (source);
GC.KeepAlive (vCardData);

return NSArray.ArrayFromHandle (res, l => new ABPerson (l, null));
return NSArray.ArrayFromHandle (res, l => new ABPerson (l, null), releaseHandle: true);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/AddressBook/ABRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public ABRecordType Type {
/// </remarks>
public override string? ToString ()
{
return CFString.FromHandle (ABRecordCopyCompositeName (Handle));
return CFString.FromHandle (ABRecordCopyCompositeName (Handle), true);
}

// TODO: Should SetValue/CopyValue/RemoveValue be public?
Expand Down Expand Up @@ -238,12 +238,12 @@ internal void RemoveValue (int property)
where T : NSObject
{
IntPtr value = CopyValue (id);
return (T?) Runtime.GetNSObject (value);
return (T?) Runtime.GetNSObject (value, true);
}

internal string? PropertyToString (int id)
{
return CFString.FromHandle (CopyValue (id));
return CFString.FromHandle (CopyValue (id), true);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/CFNetwork/CFHTTPMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public bool AppendBytes (byte [] bytes, nint count)

public NSDictionary? GetAllHeaderFields ()
{
return Runtime.GetNSObject<NSDictionary> (CFHTTPMessageCopyAllHeaderFields (GetCheckedHandle ()));
return Runtime.GetNSObject<NSDictionary> (CFHTTPMessageCopyAllHeaderFields (GetCheckedHandle ()), true);
}

#region Authentication
Expand Down
3 changes: 1 addition & 2 deletions src/CoreFoundation/CFBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,7 @@ public NSDictionary? LocalInfoDictionary {
{
if (url is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url));
// follow the create rule, no need to retain
NSDictionary? result = Runtime.GetNSObject<NSDictionary> (CFBundleCopyInfoDictionaryForURL (url.Handle));
var result = Runtime.GetNSObject<NSDictionary> (CFBundleCopyInfoDictionaryForURL (url.Handle), true);
GC.KeepAlive (url);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CoreFoundation/CFType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal CFType (NativeHandle handle, bool owns)
if (handle == IntPtr.Zero)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (handle));

return CFString.FromHandle (CFCopyDescription (handle));
return CFString.FromHandle (CFCopyDescription (handle), true);
}

[DllImport (Constants.CoreFoundationLibrary)]
Expand Down
2 changes: 1 addition & 1 deletion src/CoreGraphics/CGEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public CGEvent Copy ()
/// <remarks>To be added.</remarks>
public NSData? ToData ()
{
return Runtime.GetNSObject<NSData> (CGEventCreateData (IntPtr.Zero, Handle));
return Runtime.GetNSObject<NSData> (CGEventCreateData (IntPtr.Zero, Handle), true);
}

[DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)]
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMedia/CMTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public NSDictionary ToDictionary ()
/// <remarks>To be added.</remarks>
public string? Description {
get {
return CFString.FromHandle (CMTimeCopyDescription (IntPtr.Zero, this));
return CFString.FromHandle (CMTimeCopyDescription (IntPtr.Zero, this), true);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/CoreText/CTFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,7 @@ public CTFontDescriptor GetFontDescriptor ()
{
if (attribute is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (attribute));
var result = Runtime.GetNSObject (CTFontCopyAttribute (Handle, attribute.Handle));
var result = Runtime.GetNSObject (CTFontCopyAttribute (Handle, attribute.Handle), true);
GC.KeepAlive (attribute);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CoreVideo/CVPixelFormatDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public static CVPixelFormatType [] AllPixelFormatTypes {
/// <param name="pixelFormat">The pixel format to create a description of.</param>
public static NSDictionary? Create (CVPixelFormatType pixelFormat)
{
return Runtime.GetNSObject<NSDictionary> (CVPixelFormatDescriptionCreateWithPixelFormatType (IntPtr.Zero, (int) pixelFormat));
return Runtime.GetNSObject<NSDictionary> (CVPixelFormatDescriptionCreateWithPixelFormatType (IntPtr.Zero, (int) pixelFormat), true);
}

/// <summary>Create a description of the specified pixel format.</summary>
Expand Down
Loading
Loading