This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Commit 8c23256
committed
[[ Bug 22005 ]] Fix memory leaks when using browser widget
This patch fixes two different types of leak which occur in the
browser widget.
The first is from the wrapper classes used to host the platform
specific callback interfaces for events and javascript handlers.
A pair of these wrapper class instances leak for every instance
of the browser widget on all platforms. The leak is caused by
not releasing the (reference-counted) instances correctly.
The second is from a failure to free the c-string form of the
current javascript handlers list. The last set will leak when
the browser widget instance is destroyed. This affects Mac,
Windows, Linux and iOS. The leak has been fixed by freeing the
c-string in the per-platform destructors.1 parent b5e0e6b commit 8c23256
6 files changed
Lines changed: 35 additions & 9 deletions
File tree
- docs/notes
- libbrowser/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
53 | 68 | | |
54 | 69 | | |
55 | 70 | | |
| |||
470 | 485 | | |
471 | 486 | | |
472 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
473 | 491 | | |
474 | 492 | | |
475 | 493 | | |
| |||
515 | 533 | | |
516 | 534 | | |
517 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
518 | 539 | | |
519 | 540 | | |
520 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | | - | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1295 | 1298 | | |
1296 | 1299 | | |
1297 | 1300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 33 | + | |
| 34 | + | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
0 commit comments