dotnet / dotnet/macios

Generate code with [AllowNullAttribute] on nullable properties

Open
#13,416 3 comments 0 reactions 0 assignees View on GitHub
feature-request generator
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

Accessing the `View` property of a view controller for the first time causes it to be loaded. It can later be assigned `null` to free memory.

At the moment the property is declared as follows:

```csharp
public virtual UIView? View
```

I believe it should be declared as:

(corrected)

```csharp
[AllowNull]
public virtual UIView View
```

I don't really know enough about how the bindings are generated to know if that is possible.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.