Make the destructor of AudioCodingModule public.

This allows the type to be used with a scoped_ptr. Remove all calls to
the deprecated Destroy() from tests.

R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2200006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4731 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/main/test/TestVADDTX.cc b/webrtc/modules/audio_coding/main/test/TestVADDTX.cc
index 35f5059..620329b 100644
--- a/webrtc/modules/audio_coding/main/test/TestVADDTX.cc
+++ b/webrtc/modules/audio_coding/main/test/TestVADDTX.cc
@@ -23,20 +23,12 @@
 namespace webrtc {
 
 TestVADDTX::TestVADDTX()
-    : _acmA(NULL),
-      _acmB(NULL),
+    : _acmA(AudioCodingModule::Create(0)),
+      _acmB(AudioCodingModule::Create(1)),
       _channelA2B(NULL) {
 }
 
 TestVADDTX::~TestVADDTX() {
-  if (_acmA != NULL) {
-    AudioCodingModule::Destroy(_acmA);
-    _acmA = NULL;
-  }
-  if (_acmB != NULL) {
-    AudioCodingModule::Destroy(_acmB);
-    _acmB = NULL;
-  }
   if (_channelA2B != NULL) {
     delete _channelA2B;
     _channelA2B = NULL;
@@ -48,9 +40,6 @@
       "audio_coding/testfile32kHz", "pcm");
   _inFileA.Open(file_name, 32000, "rb");
 
-  _acmA = AudioCodingModule::Create(0);
-  _acmB = AudioCodingModule::Create(1);
-
   EXPECT_EQ(0, _acmA->InitializeReceiver());
   EXPECT_EQ(0, _acmB->InitializeReceiver());
 
@@ -68,7 +57,7 @@
   // Create and connect the channel
   _channelA2B = new Channel;
   _acmA->RegisterTransportCallback(_channelA2B);
-  _channelA2B->RegisterReceiverACM(_acmB);
+  _channelA2B->RegisterReceiverACM(_acmB.get());
 
   _acmA->RegisterVADCallback(&_monitor);
 
@@ -207,11 +196,11 @@
   AudioCodingModule* myACM;
   switch (side) {
     case 'A': {
-      myACM = _acmA;
+      myACM = _acmA.get();
       break;
     }
     case 'B': {
-      myACM = _acmB;
+      myACM = _acmB.get();
       break;
     }
     default: