Changeset 5736 for pjproject


Ignore:
Timestamp:
Feb 12, 2018 7:07:02 AM (7 years ago)
Author:
ming
Message:

Re #2086: Add more info for better understanding of the lifetime of PJSUA2 objects. And add an example to explicitly delete PJSUA2 objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/csharp/sample.cs

    r5735 r5736  
    2525    public class MyAccount : Account 
    2626    { 
     27        ~MyAccount() 
     28        { 
     29            Console.WriteLine("*** Account is being deleted"); 
     30        } 
     31 
    2732        override public void onRegState(OnRegStateParam prm) 
    2833        { 
     
    8186                acc.create(accCfg); 
    8287 
     88                Console.WriteLine("*** DESTROYING PJSUA2 ***"); 
     89                // Explicitly delete account when unused 
     90                acc.Dispose(); 
    8391                ep.libDestroy(); 
    8492            } catch (Exception err) { 
Note: See TracChangeset for help on using the changeset viewer.