CommunityToolkit / CommunityToolkit/Maui

[BUG] [iOS] DrawingView memory leak

Open
#1,914 3 comments 0 reactions 0 assignees View on GitHub
area/views bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

DrawingView has memory leak.

### Expected Behavior

DrawingView doesn't have memory leak.

### Steps To Reproduce

1. Open and run solution from reproduction repository.
2. Click "Show Page With Leak" button
3. Navgigate back from opened page
4. Click "Check Leak" button
5. Message box will appear with "Leak / No Leak" message. Sometimes it shows "Leak", sometimes "No leak" - that means the whole page leaks or not. BUT! See text in the message - "MauiDrawingView is still alive" - shows that native object always stays alive.

### Link to public reproduction project repository

https://github.com/nevse/maui-tests-drawingviewleak

### Environment

```markdown
- .NET MAUI CommunityToolkit: 5.3.0
- OS: macos 14.0
- .NET MAUI: 8.0.20
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.