diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-04-19 10:40:43 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-07-16 22:00:58 -0700 |
commit | 3fafe61ef25c1899fdc817c52163aec16c31055c (patch) | |
tree | 67db2408dbf66ae05d33e84188bf969f8ddf0fa8 /src/com/android/bluetooth/opp/BluetoothOppTransfer.java | |
parent | ac234ef0ddd67471d82f77c41535a5ea1b68b443 (diff) | |
download | android_packages_apps_Bluetooth-3fafe61ef25c1899fdc817c52163aec16c31055c.tar.gz android_packages_apps_Bluetooth-3fafe61ef25c1899fdc817c52163aec16c31055c.tar.bz2 android_packages_apps_Bluetooth-3fafe61ef25c1899fdc817c52163aec16c31055c.zip |
Memory profiling changes : Updated the Bluetooth code to handle cleaning up of object references (context, handlers, and collection objects ) during service cleanup.Memory profiling changes : Updated the Bluetooth code to handle cleaning up of object references (context, handlers, and collection objects ) during service cleanup.
Change-Id: I2b0235f71c1feaf32215b2aaf89a2e06d8fa7d73
Diffstat (limited to 'src/com/android/bluetooth/opp/BluetoothOppTransfer.java')
-rwxr-xr-x | src/com/android/bluetooth/opp/BluetoothOppTransfer.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java index 1f8690b98..089337007 100755 --- a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java @@ -415,6 +415,28 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch } } + /** + * Object cleanup + */ + public void cleanup() { + if(mContext != null) + mContext = null; + if(mAdapter != null) + mAdapter = null; + if(mBatch != null) { + mBatch = null; + } + if(mSession != null) + mSession = null; + if(mCurrentShare != null) + mCurrentShare = null; + if(mTransport != null) + mTransport = null; + if(mSessionHandler != null) { + mSessionHandler = null; + } + } + private void startObexSession() { mBatch.mStatus = Constants.BATCH_STATUS_RUNNING; |