diff --git a/repos/gems/src/server/terminal/main.cc b/repos/gems/src/server/terminal/main.cc index f81b9f494b..954c2ce6cf 100644 --- a/repos/gems/src/server/terminal/main.cc +++ b/repos/gems/src/server/terminal/main.cc @@ -284,9 +284,7 @@ namespace Terminal { Flush_callback_registry &_flush_callback_registry; Trigger_flush_callback &_trigger_flush_callback; - Genode::Attached_ram_dataspace _io_buffer; - Framebuffer::Mode _fb_mode; Genode::Dataspace_capability _fb_ds_cap; unsigned _char_width; @@ -489,15 +487,14 @@ namespace Terminal { */ Genode::size_t io_buffer_size = 4096; - Session_component *session = - new (md_alloc()) Session_component(_env, *md_alloc(), - _read_buffer, - _framebuffer, - io_buffer_size, - _flush_callback_registry, - _trigger_flush_callback, - _font_family); - return session; + return new (md_alloc()) + Session_component(_env, *md_alloc(), + _read_buffer, + _framebuffer, + io_buffer_size, + _flush_callback_registry, + _trigger_flush_callback, + _font_family); } public: @@ -532,7 +529,7 @@ struct Terminal::Main Input::Connection _input { _env }; Timer::Connection _timer { _env }; - Sliced_heap _sliced_heap { _env.ram(), _env.rm() }; + Heap _heap { _env.ram(), _env.rm() }; /* input read buffer */ Read_buffer _read_buffer; @@ -599,7 +596,7 @@ struct Terminal::Main unsigned char const *control) : _env(env), - _root(_env, _sliced_heap, + _root(_env, _heap, _read_buffer, _framebuffer, _flush_callback_registry, _trigger_flush_callback, diff --git a/repos/os/include/terminal/cell_array.h b/repos/os/include/terminal/cell_array.h index a1ff6b83e1..39fb57cfe0 100644 --- a/repos/os/include/terminal/cell_array.h +++ b/repos/os/include/terminal/cell_array.h @@ -89,7 +89,14 @@ class Cell_array _array[i] = new (alloc) CELL[num_cols]; } - /* XXX destructor is missing */ + ~Cell_array() + { + for (unsigned i = 0; i < _num_lines; i++) + Genode::destroy(_alloc, _array[i]); + + Genode::destroy(_alloc, _line_dirty); + Genode::destroy(_alloc, _array); + } void set_cell(int column, int line, CELL cell) {