We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9b700a commit 8efaedbCopy full SHA for 8efaedb
inst/include/Rcpp/iostream/Rstreambuf.h
@@ -43,18 +43,11 @@ namespace Rcpp {
43
template <bool OUTPUT>
44
class Rostream : public std::ostream {
45
typedef Rstreambuf<OUTPUT> Buffer ;
46
- Buffer* buf ;
+ Buffer buf ;
47
public:
48
Rostream() :
49
- std::ostream( new Buffer ),
50
- buf( static_cast<Buffer*>( rdbuf() ) )
+ std::ostream( &buf )
51
{}
52
- ~Rostream() {
53
- if (buf != NULL) {
54
- delete buf;
55
- buf = NULL;
56
- }
57
58
};
59
// #nocov start
60
template <> inline std::streamsize Rstreambuf<true>::xsputn(const char *s, std::streamsize num ) {
0 commit comments