|
|
| version 1.28, 2015/10/26 01:21:56 | version 1.30, 2019/12/05 22:21:16 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: stack class decl. | Parser: stack class decl. |
| Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) | Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 39 public: | Line 39 public: |
| /// call this prior to collecting garbage [in unused part of stack there may be pointers(unused)] | /// call this prior to collecting garbage [in unused part of stack there may be pointers(unused)] |
| void wipe_unused() { | void wipe_unused() { |
| if(size_t above_top_size=this->fallocated-this->fused) | if(size_t above_top_size=this->fallocated-this->fused) |
| memset(&this->felements[this->fused], 0, above_top_size*sizeof(T)); | memset((void *)&this->felements[this->fused], 0, above_top_size*sizeof(T)); |
| } | } |
| protected: | protected: |