Commit dcafdbc
committed
Improve error reporting in code that checks for buffer refcount leaks.
Formerly we just Assert'ed that each refcount was zero, which was quick
and easy but failed to provide a good overview of what was wrong.
Change the code so that we'll call PrintBufferLeakWarning() for each
buffer with a nonzero refcount, and then Assert at the end of the loop.
This costs nothing in runtime and might ease diagnosis of some bugs.
Greg Smith, reviewed by Satoshi Nagayasu, further tweaked by me1 parent 73e7025 commit dcafdbc
2 files changed
+37
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | | - | |
| 1702 | + | |
| 1703 | + | |
1703 | 1704 | | |
1704 | | - | |
| 1705 | + | |
1705 | 1706 | | |
1706 | | - | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
1707 | 1712 | | |
| 1713 | + | |
1708 | 1714 | | |
1709 | 1715 | | |
1710 | 1716 | | |
| |||
1739 | 1745 | | |
1740 | 1746 | | |
1741 | 1747 | | |
1742 | | - | |
| 1748 | + | |
| 1749 | + | |
1743 | 1750 | | |
1744 | | - | |
| 1751 | + | |
1745 | 1752 | | |
1746 | | - | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
1747 | 1758 | | |
| 1759 | + | |
1748 | 1760 | | |
1749 | 1761 | | |
1750 | 1762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
501 | 501 | | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
507 | 514 | | |
| 515 | + | |
508 | 516 | | |
509 | 517 | | |
510 | 518 | | |
| |||
523 | 531 | | |
524 | 532 | | |
525 | 533 | | |
| 534 | + | |
526 | 535 | | |
527 | 536 | | |
528 | 537 | | |
529 | 538 | | |
530 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
531 | 546 | | |
| 547 | + | |
532 | 548 | | |
533 | 549 | | |
534 | 550 | | |
0 commit comments