diff options
| author | nyamatongwe <devnull@localhost> | 2013-01-27 10:22:55 +1100 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2013-01-27 10:22:55 +1100 |
| commit | 9a4bac67eb69aaaa550e88d6c466d15a1d9eb310 (patch) | |
| tree | 1703615ce67b73b01f59acbd57d57aedcbb9df2f | |
| parent | 6e72ebeabe39b7ac2d1b131dae75b6f58aa46ffd (diff) | |
| download | scintilla-mirror-9a4bac67eb69aaaa550e88d6c466d15a1d9eb310.tar.gz | |
Disallow copying VarBuffer objects to ensure memory is managed correctly.
| -rw-r--r-- | win32/PlatWin.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 380389f2f..c1cd38f71 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -448,6 +448,9 @@ void Font::Release() { template<typename T, int lengthStandard> class VarBuffer { T bufferStandard[lengthStandard]; + // Private so VarBuffer objects can not be copied + VarBuffer(const VarBuffer &); + VarBuffer &operator=(const VarBuffer &); public: T *buffer; VarBuffer(size_t length) : buffer(0) { |
