[vlc-devel] commit: Remove suspicious and suspiciously dead code ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 10 18:32:04 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jan 10 19:31:09 2009 +0200| [740387c624ff842f61d540b8ca1c20231f506430] | committer: Rémi Denis-Courmont 

Remove suspicious and suspiciously dead code

A destructor would never have to release its own object, since the
destructor is only called when the object is not referenced anymore.
On the other hand, it is not clear to me whether SD objects still need
a destructor.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=740387c624ff842f61d540b8ca1c20231f506430
---

 src/playlist/services_discovery.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index b177486..8649574 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -33,8 +33,6 @@
 #include "../libvlc.h"
 
 
-static void services_discovery_Destructor ( services_discovery_t * p_sd );
-
 /*
  * Services discovery
  * Basically you just listen to Service discovery event through the
@@ -131,17 +129,6 @@ void vlc_sd_Stop ( services_discovery_t * p_sd )
 }
 
 /***********************************************************************
- * Destructor
- ***********************************************************************/
-static void services_discovery_Destructor ( services_discovery_t * p_sd )
-{
-    assert(!p_sd->p_module); /* Forgot to call Stop */
-
-    vlc_event_manager_fini( &p_sd->event_manager );
-    vlc_object_release( p_sd );
-}
-
-/***********************************************************************
  * GetLocalizedName
  ***********************************************************************/
 char *




More information about the vlc-devel mailing list