Ignore:
Timestamp:
May 9, 2014 8:47:06 AM (10 years ago)
Author:
bennylp
Message:

Re #1768: Fixed problems with Java garbage collection on call and buddy object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MyApp.java

    r4734 r4840  
    4949        public void onCallState(OnCallStateParam prm) { 
    5050                MyApp.observer.notifyCallState(this); 
     51                try { 
     52                        CallInfo ci = getInfo(); 
     53                        if (ci.getState() == pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) { 
     54                                this.delete(); 
     55                                MainActivity.currentCall = null; 
     56                        } 
     57                } catch (Exception e) { 
     58                        return; 
     59                } 
    5160        } 
    5261         
     
    101110                        bud.create(this, bud_cfg); 
    102111                } catch (Exception e) { 
     112                        bud.delete(); 
    103113                        bud = null; 
    104114                } 
     
    117127        public void delBuddy(MyBuddy buddy) { 
    118128                buddyList.remove(buddy); 
     129                buddy.delete(); 
    119130        } 
    120131         
    121132        public void delBuddy(int index) { 
     133                MyBuddy bud = buddyList.get(index); 
    122134                buddyList.remove(index); 
     135                bud.delete(); 
    123136        } 
    124137         
Note: See TracChangeset for help on using the changeset viewer.