Commit 0e52393
Properly stop render loop on destroy() using context-based event removal
Application.destroy() now uses off(event, method, this) to cleanly
unregister TICK, BLUR, and FOCUS listeners — leveraging the native
context support added to EventEmitter.
Extracted anonymous listeners into named methods (_tick, _onBlur,
_onFocus) so they can be properly removed by function reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4e6c74d commit 0e52393
1 file changed
Lines changed: 36 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
370 | 354 | | |
371 | 355 | | |
372 | 356 | | |
| |||
476 | 460 | | |
477 | 461 | | |
478 | 462 | | |
479 | | - | |
| 463 | + | |
480 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
481 | 468 | | |
482 | 469 | | |
483 | 470 | | |
| |||
507 | 494 | | |
508 | 495 | | |
509 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
510 | 523 | | |
511 | 524 | | |
512 | 525 | | |
| |||
0 commit comments