Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions source/src/basic/TracerImpl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public:
basic_otstream() : std::basic_ostream<CharT, Traits> ( new basic_tstringbuf<CharT, Traits> (this) ) {}
~basic_otstream() override { delete this->rdbuf(); }

// ~basic_otstream() calls delete this->rdbuf(); a copy would share the same buffer, causing a double-free.
basic_otstream( basic_otstream const & ) = delete;
basic_otstream & operator=( basic_otstream const & ) = delete;

/// @brief Return true if inner string buffer is empty.
bool is_flushed() const {
Expand All @@ -68,13 +71,6 @@ protected:
/// TracerImpl and TracerProxyImpl objects.
virtual void t_flush(std::string const &) {};

private:
basic_otstream(basic_otstream const & );


/// Data members
/// @brief inner string buffer
//std::basic_stringbuf<CharT, Traits> * tstringbuf_;
};


Expand Down Expand Up @@ -150,6 +146,9 @@ public:

~TracerImpl() override;

TracerImpl( TracerImpl const & ) = delete;
TracerImpl & operator=( TracerImpl const & ) = delete;

/// @brief re-init using data from another tracer object.
void init( TracerImpl const & tr );

Expand Down Expand Up @@ -270,9 +269,6 @@ protected:
void t_flush(std::string const &) override;

private: /// Functions
/// @brief copy constructor.
TracerImpl( TracerImpl const & tr ) = delete;

static OstreamPointer &final_stream();

/// @brief return true if channel is inside vector, some logic apply.
Expand Down