From c39215bf5dee9d95f67132e251f7ac9492e17624 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Mon, 5 Nov 2012 13:51:09 -0800 Subject: [PATCH] Clarifying onwership rules for BroString constructors. --- src/BroString.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BroString.h b/src/BroString.h index 58991d78af..d04e9768f2 100644 --- a/src/BroString.h +++ b/src/BroString.h @@ -34,11 +34,15 @@ public: typedef IdxVec::iterator IdxVecIt; typedef IdxVec::const_iterator IdxVecCIt; - BroString(int arg_final_NUL, byte_vec str, int arg_n); + // Constructors creating internal copies of the data passed in. BroString(const u_char* str, int arg_n, int add_NUL); BroString(const char* str); BroString(const string& str); BroString(const BroString& bs); + + // Constructor that takes owernship of the vector passed in. + BroString(int arg_final_NUL, byte_vec str, int arg_n); + BroString(); ~BroString() { Reset(); }