skip to Main Content

Ubuntu – custom allocator and std::map

Here's the code i'm able to compile with gcc: #include <iostream> #include <map> template <class T> class map_alloc { public: typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef const T* const_pointer; typedef T& reference; typedef const T& const_reference;…

VIEW QUESTION

Html – Why isn't my custom element being garbage-collected?

Consider a webpage that contains a button which triggers the opening of a modal: <dialog></dialog> <button>Open modal</button> const trigger = document.querySelector(`button`); const wrapper = document.querySelector(`dialog`); trigger.addEventListener(`click`, () => { wrapper.replaceChildren(new Modal()); wrapper.showModal(); }); The modal is a custom element: class…

VIEW QUESTION
Back To Top
Search