Changes between Version 18 and Version 19 of pjsip-doc/intro_pjsua2
- Timestamp:
- May 11, 2016 9:51:41 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pjsip-doc/intro_pjsua2
v18 v19 61 61 Garbage collection (GC) exists in Java and Python (and other languages, but we don't support those for now), and there are some problems with it when it comes to PJSUA2 usage: 62 62 63 1. premature destruction of PJSUA2 objects which are created in Java and Python space and passed to the native space 63 1. premature destruction of PJSUA2 objects which are created in Java and Python space and passed to the native space without keeping reference to the object 64 64 2. it delays the destruction of objects (including PJSUA2 objects), causing the code in object's destructor to be executed out of order 65 3. the GC operationmay run on different thread not previously registered to PJLIB, causing assertion65 3. the destruction operation by GC may run on different thread not previously registered to PJLIB, causing assertion 66 66 67 67 Some examples for problem 1 are (these examples are by no means a complete list) when adding Buddy object to an account using Account.addBuddy() or setting LogWriter by calling EpConfig.LogConfig.setLogWriter(). To avoid this problem, application needs to maintain an explicit reference on objects created in its application, instead of relying on PJSUA2 native library to keep track of those objects, i.e. :