[libsigcplusplus] test_disconnect: Add comment to explain potential leak.



commit cde16da471932b9ce4a71a4d60531f47e7a70e96
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 22 10:55:20 2016 +0200

    test_disconnect: Add comment to explain potential leak.
    
    Because clang-tidy incorrectly (but understandably) complains about this.

 tests/test_disconnect.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_disconnect.cc b/tests/test_disconnect.cc
index c50ffd7..7754663 100644
--- a/tests/test_disconnect.cc
+++ b/tests/test_disconnect.cc
@@ -165,7 +165,7 @@ main(int argc, char* argv[])
   util->check_result(result_stream, "sig is empty (size=0): ");
 
   result_stream << "deleting a signal during emission... ";
-  auto b = new B;
+  auto b = new B; //This is deleted by B::destroy().
   b->emit();
   util->check_result(result_stream, "deleting a signal during emission... Good bye world!");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]