Commit 5485ea9
fix: prevent FFI event flooding and memory leak in progress callbacks
This commit addresses two critical issues in the FFI layer:
1. Event Throttling: Limit event draining to 500 events per call to prevent
UI/main thread flooding. Remaining events stay queued for the next drain.
2. Memory Leak Fix: Properly free heap-allocated stage_message strings in
FFIDetailedSyncProgress after each progress callback to avoid per-callback
memory leaks.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent bba5e0c commit 5485ea9
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
242 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| |||
354 | 361 | | |
355 | 362 | | |
356 | 363 | | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
823 | 831 | | |
824 | 832 | | |
825 | 833 | | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
826 | 841 | | |
827 | 842 | | |
828 | 843 | | |
| |||
0 commit comments