Commit a0be15b
committed
Fix iOS screenshot API to use dispatch_sync and proper memory management
The initial implementation used dispatch_async which caused a NullPointerException
because Java method calls require proper thread context. When using dispatch_async,
the calling thread's context is not maintained in the async block.
Changes:
- Changed dispatch_async to dispatch_sync to maintain thread context for Java calls
- Added POOL_BEGIN() at the start of the dispatch block for proper autorelease pool
- Added POOL_END() before early returns and at the end of the block
This follows the same pattern used throughout the codebase for operations that
capture images and call back to Java (e.g., createPeerImage at line 2076).1 parent 5c35e42 commit a0be15b
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5212 | 5212 | | |
5213 | 5213 | | |
5214 | 5214 | | |
5215 | | - | |
| 5215 | + | |
| 5216 | + | |
5216 | 5217 | | |
5217 | 5218 | | |
5218 | 5219 | | |
| 5220 | + | |
5219 | 5221 | | |
5220 | 5222 | | |
5221 | 5223 | | |
5222 | 5224 | | |
5223 | 5225 | | |
| 5226 | + | |
5224 | 5227 | | |
5225 | 5228 | | |
5226 | 5229 | | |
| |||
5231 | 5234 | | |
5232 | 5235 | | |
5233 | 5236 | | |
| 5237 | + | |
5234 | 5238 | | |
5235 | 5239 | | |
5236 | 5240 | | |
| |||
0 commit comments