diff --git a/sources/appl/Buffer.cpp b/sources/appl/Buffer.cpp index 0a42d35..57e6c5a 100644 --- a/sources/appl/Buffer.cpp +++ b/sources/appl/Buffer.cpp @@ -139,9 +139,7 @@ appl::Buffer::Buffer() : } appl::Buffer::~Buffer() { - if (m_highlight == NULL) { - appl::Highlight::release(m_highlight); - } + } bool appl::Buffer::loadFile(const std::string& _name) { @@ -694,9 +692,7 @@ void appl::Buffer::tryFindHighlightType() { void appl::Buffer::setHighlightType(const std::string& _type) { m_highlightType = ""; cleanHighLight(); - if (m_highlight == NULL) { - appl::Highlight::release(m_highlight); - } + m_highlight.reset(); std::string resourceName = appl::highlightManager::getFileWithTypeType(_type); if (resourceName == "") { return; diff --git a/sources/appl/Buffer.h b/sources/appl/Buffer.h index edf82b7..25e497c 100644 --- a/sources/appl/Buffer.h +++ b/sources/appl/Buffer.h @@ -588,7 +588,7 @@ namespace appl { protected: std::string m_highlightType; //!< Name of the highlight type - appl::Highlight* m_highlight; //!< internal link with the Highlight system + ewol::object::Shared m_highlight; //!< internal link with the Highlight system std::vector m_HLDataPass1; //!< colorisation position in the current buffer pass 1 public: /** diff --git a/sources/appl/BufferManager.h b/sources/appl/BufferManager.h index 11cb340..773ead8 100644 --- a/sources/appl/BufferManager.h +++ b/sources/appl/BufferManager.h @@ -21,7 +21,7 @@ namespace appl { public: ~BufferManager(); private: - std::vector> m_list; // list of all buffer curently open + std::vector> m_list; // list of all buffer curently open public: /** * @brief Get a specific buffer with his name (can create a new buffer). diff --git a/sources/appl/Gui/WorkerCloseAllFile.cpp b/sources/appl/Gui/WorkerCloseAllFile.cpp index 25e0f7d..4c0d8db 100644 --- a/sources/appl/Gui/WorkerCloseAllFile.cpp +++ b/sources/appl/Gui/WorkerCloseAllFile.cpp @@ -29,7 +29,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() : } // List all current open file : for (int64_t iii=m_bufferManager->size()-1; iii>=0; --iii) { - appl::Buffer* tmpBuffer = m_bufferManager->get(iii); + ewol::object::Shared tmpBuffer = m_bufferManager->get(iii); if (tmpBuffer == NULL) { continue; } @@ -45,7 +45,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() : return; } // create the worker : - m_worker = new appl::WorkerCloseFile(m_bufferNameList.front()); + m_worker = ewol::object::makeShared(new appl::WorkerCloseFile(m_bufferNameList.front())); // remove first element : m_bufferNameList.erase(m_bufferNameList.begin()); if (m_bufferNameList.size() == 0) { @@ -56,7 +56,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() : } appl::WorkerCloseAllFile::~WorkerCloseAllFile() { - appl::BufferManager::release(m_bufferManager); + } void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::object::Message& _msg) { @@ -70,7 +70,7 @@ void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::object::Message& _ms return; } // create the worker : - m_worker = new appl::WorkerCloseFile(m_bufferNameList.front()); + m_worker = ewol::object::makeShared(new appl::WorkerCloseFile(m_bufferNameList.front())); // remove first element : m_bufferNameList.erase(m_bufferNameList.begin()); if (m_bufferNameList.size() == 0) { diff --git a/sources/appl/Gui/WorkerCloseAllFile.h b/sources/appl/Gui/WorkerCloseAllFile.h index ea34373..8d6714e 100644 --- a/sources/appl/Gui/WorkerCloseAllFile.h +++ b/sources/appl/Gui/WorkerCloseAllFile.h @@ -19,8 +19,8 @@ namespace appl { virtual ~WorkerCloseAllFile(); private: std::vector m_bufferNameList; - appl::WorkerCloseFile* m_worker; //! pop-up element that is open... - appl::BufferManager* m_bufferManager; //!< handle on the buffer manager + ewol::object::Shared m_worker; //! pop-up element that is open... + ewol::object::Shared m_bufferManager; //!< handle on the buffer manager public: // derived function virtual void onReceiveMessage(const ewol::object::Message& _msg); virtual void onObjectRemove(const ewol::object::Shared& _removeObject); diff --git a/sources/appl/Gui/WorkerCloseFile.cpp b/sources/appl/Gui/WorkerCloseFile.cpp index 39c2ea7..aa304d3 100644 --- a/sources/appl/Gui/WorkerCloseFile.cpp +++ b/sources/appl/Gui/WorkerCloseFile.cpp @@ -38,7 +38,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) : } if (m_bufferName == "") { // need to find the curent file ... - appl::Buffer* tmpp = m_bufferManager->getBufferSelected(); + ewol::object::Shared tmpp = m_bufferManager->getBufferSelected(); if (tmpp == NULL) { APPL_ERROR("No selected buffer now ..."); autoDestroy(); @@ -63,14 +63,14 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) : return; } - ewol::widget::StdPopUp* tmpPopUp = new ewol::widget::StdPopUp(); + ewol::object::Shared tmpPopUp = ewol::object::makeShared(new ewol::widget::StdPopUp()); if (tmpPopUp == NULL) { APPL_ERROR("Can not create a simple pop-up"); return; } tmpPopUp->setTitle("Close un-saved file:"); tmpPopUp->setComment("The file named : \"" + m_buffer->getFileName() + "\" is curently modify.
If you don't saves these modifications,
they will be definitly lost..."); - ewol::Widget* bt = NULL; + ewol::object::Shared bt = NULL; if (m_buffer->hasFileName() == true) { bt = tmpPopUp->addButton("Save", true); if (bt != NULL) { @@ -87,7 +87,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) : } tmpPopUp->addButton("Cancel", true); tmpPopUp->setRemoveOnExternClick(true); - ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows(); + ewol::object::Shared tmpWindows = ewol::getContext().getWindows(); if (tmpWindows == NULL) { APPL_ERROR("Error to get the windows."); autoDestroy(); @@ -97,7 +97,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) : } appl::WorkerCloseFile::~WorkerCloseFile() { - appl::BufferManager::release(m_bufferManager); + } void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg) { @@ -107,7 +107,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg) } APPL_DEBUG("have message : " << _msg); if (_msg.getMessage() == s_saveAsValidate) { - m_worker = new appl::WorkerSaveFile(m_bufferName); + m_worker = ewol::object::makeShared(new appl::WorkerSaveFile(m_bufferName)); if (m_worker != NULL) { m_worker->registerOnEvent(this, appl::WorkerSaveFile::eventSaveDone, s_saveAsDone); } @@ -118,7 +118,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg) return; } if (m_buffer->storeFile() == false) { - ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows(); + ewol::object::Shared tmpWindows = ewol::getContext().getWindows(); if (tmpWindows == NULL) { return; } diff --git a/sources/appl/Gui/WorkerCloseFile.h b/sources/appl/Gui/WorkerCloseFile.h index 7583de1..10f111a 100644 --- a/sources/appl/Gui/WorkerCloseFile.h +++ b/sources/appl/Gui/WorkerCloseFile.h @@ -23,9 +23,9 @@ namespace appl { virtual ~WorkerCloseFile(); private: std::string m_bufferName; - appl::Buffer* m_buffer; //!< reference on the buffer (when rename, we have no more reference on the buffer - appl::WorkerSaveFile* m_worker; //! sub-worker element... - appl::BufferManager* m_bufferManager; //!< handle on the buffer manager + ewol::object::Shared m_buffer; //!< reference on the buffer (when rename, we have no more reference on the buffer + ewol::object::Shared m_worker; //! sub-worker element... + ewol::object::Shared m_bufferManager; //!< handle on the buffer manager public: // derived function virtual void onReceiveMessage(const ewol::object::Message& _msg); virtual void onObjectRemove(const ewol::object::Shared& _removeObject); diff --git a/sources/appl/Gui/WorkerSaveAllFile.cpp b/sources/appl/Gui/WorkerSaveAllFile.cpp index cae968e..9bc1b05 100644 --- a/sources/appl/Gui/WorkerSaveAllFile.cpp +++ b/sources/appl/Gui/WorkerSaveAllFile.cpp @@ -29,7 +29,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() : } // List all current open file : for (size_t iii=0; iiisize(); ++iii) { - appl::Buffer* tmpBuffer = m_bufferManager->get(iii); + ewol::object::Shared tmpBuffer = m_bufferManager->get(iii); if (tmpBuffer == NULL) { continue; } @@ -48,7 +48,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() : return; } // create the worker : - m_worker = new appl::WorkerSaveFile(m_bufferNameList.front()); + m_worker = ewol::object::makeShared(new appl::WorkerSaveFile(m_bufferNameList.front())); // remove first element : m_bufferNameList.erase(m_bufferNameList.begin()); if (m_bufferNameList.size() == 0) { @@ -59,7 +59,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() : } appl::WorkerSaveAllFile::~WorkerSaveAllFile() { - appl::BufferManager::release(m_bufferManager); + } void appl::WorkerSaveAllFile::onReceiveMessage(const ewol::object::Message& _msg) { diff --git a/sources/appl/Gui/WorkerSaveAllFile.h b/sources/appl/Gui/WorkerSaveAllFile.h index fb3370f..2d8c0d4 100644 --- a/sources/appl/Gui/WorkerSaveAllFile.h +++ b/sources/appl/Gui/WorkerSaveAllFile.h @@ -19,8 +19,8 @@ namespace appl { virtual ~WorkerSaveAllFile(); private: std::vector m_bufferNameList; - appl::WorkerSaveFile* m_worker; //! pop-up element that is open... - appl::BufferManager* m_bufferManager; //!< handle on the buffer manager + ewol::object::Shared m_worker; //! pop-up element that is open... + ewol::object::Shared m_bufferManager; //!< handle on the buffer manager public: // derived function virtual void onReceiveMessage(const ewol::object::Message& _msg); virtual void onObjectRemove(const ewol::object::Shared& _removeObject); diff --git a/sources/appl/Gui/WorkerSaveFile.cpp b/sources/appl/Gui/WorkerSaveFile.cpp index 2f022eb..c331126 100644 --- a/sources/appl/Gui/WorkerSaveFile.cpp +++ b/sources/appl/Gui/WorkerSaveFile.cpp @@ -33,7 +33,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force } if (m_bufferName == "") { // need to find the curent file ... - appl::Buffer* tmpp = m_bufferManager->getBufferSelected(); + ewol::object::Shared tmpp = m_bufferManager->getBufferSelected(); if (tmpp == NULL) { APPL_ERROR("No selected buffer now ..."); autoDestroy(); @@ -46,7 +46,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force autoDestroy(); return; } - appl::Buffer* tmpBuffer = m_bufferManager->get(m_bufferName); + ewol::object::Shared tmpBuffer = m_bufferManager->get(m_bufferName); if (tmpBuffer == NULL) { APPL_ERROR("Error to get the buffer : " << m_bufferName); autoDestroy(); @@ -60,7 +60,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force return; } } - m_chooser = new ewol::widget::FileChooser(); + m_chooser = ewol::object::makeShared(new ewol::widget::FileChooser()); if (NULL == m_chooser) { APPL_ERROR("Can not allocate widget == > display might be in error"); autoDestroy(); @@ -71,7 +71,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force etk::FSNode tmpName(m_bufferName); m_chooser->setFolder(tmpName.getNameFolder()); m_chooser->setFileName(tmpName.getNameFile()); - ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows(); + ewol::object::Shared tmpWindows = ewol::getContext().getWindows(); if (tmpWindows == NULL) { APPL_ERROR("Error to get the windows."); autoDestroy(); @@ -82,7 +82,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force } appl::WorkerSaveFile::~WorkerSaveFile() { - appl::BufferManager::release(m_bufferManager); + } void appl::WorkerSaveFile::onReceiveMessage(const ewol::object::Message& _msg) { @@ -99,14 +99,14 @@ void appl::WorkerSaveFile::onReceiveMessage(const ewol::object::Message& _msg) { APPL_ERROR("Try to save an non-existant file :" << m_bufferName); return; } - appl::Buffer* tmpBuffer = m_bufferManager->get(m_bufferName); + ewol::object::Shared tmpBuffer = m_bufferManager->get(m_bufferName); if (tmpBuffer == NULL) { APPL_ERROR("Error to get the buffer : " << m_bufferName); return; } tmpBuffer->setFileName(_msg.getData()); if (tmpBuffer->storeFile() == false) { - ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows(); + ewol::object::Shared tmpWindows = ewol::getContext().getWindows(); if (tmpWindows == NULL) { return; } diff --git a/sources/appl/Gui/WorkerSaveFile.h b/sources/appl/Gui/WorkerSaveFile.h index 1a26789..03c1e6f 100644 --- a/sources/appl/Gui/WorkerSaveFile.h +++ b/sources/appl/Gui/WorkerSaveFile.h @@ -22,7 +22,7 @@ namespace appl { private: std::string m_bufferName; ewol::object::Shared m_chooser; //! pop-up element that is open... - appl::BufferManager* m_bufferManager; //!< handle on the buffer manager + ewol::object::Shared m_bufferManager; //!< handle on the buffer manager public: // derived function virtual void onReceiveMessage(const ewol::object::Message& _msg); virtual void onObjectRemove(const ewol::object::Shared& _removeObject); diff --git a/sources/appl/Highlight.cpp b/sources/appl/Highlight.cpp index f3fb5f7..fa5dfc3 100644 --- a/sources/appl/Highlight.cpp +++ b/sources/appl/Highlight.cpp @@ -260,29 +260,20 @@ void appl::Highlight::parse2(int64_t _start, } } -appl::Highlight* appl::Highlight::keep(const std::string& _filename) { +ewol::object::Shared appl::Highlight::keep(const std::string& _filename) { //EWOL_INFO("KEEP : appl::Highlight : file : \"" << _filename << "\""); - appl::Highlight* object = static_cast(getManager().localKeep(_filename)); + ewol::object::Shared object = ewol::dynamic_pointer_cast(getManager().localKeep(_filename)); if (NULL != object) { return object; } EWOL_INFO("CREATE : appl::Highlight : file : \"" << _filename << "\""); // this element create a new one every time .... - object = new appl::Highlight(_filename, "THEME:COLOR:textViewer.json"); + object = ewol::object::makeShared(new appl::Highlight(_filename, "THEME:COLOR:textViewer.json")); if (NULL == object) { EWOL_ERROR("allocation error of a resource : ??Highlight??"); return NULL; } getManager().localAdd(object); return object; - } -void appl::Highlight::release(appl::Highlight*& _object) { - if (NULL == _object) { - return; - } - ewol::Resource* object2 = static_cast(_object); - getManager().release(object2); - _object = NULL; -} diff --git a/sources/appl/Highlight.h b/sources/appl/Highlight.h index 01b9374..baeec0d 100644 --- a/sources/appl/Highlight.h +++ b/sources/appl/Highlight.h @@ -34,10 +34,11 @@ namespace appl { namespace appl { class Highlight : public ewol::Resource { private: - appl::GlyphPainting* m_paintingProperties; + ewol::object::Shared m_paintingProperties; protected: // Constructeur Highlight(const std::string& _xmlFilename, const std::string& _colorFile); + public: ~Highlight(); private: std::string m_typeName; //!< descriptive string type like "C/C++" @@ -73,12 +74,7 @@ namespace appl { * @param[in] _filename Name of the configuration file. * @return pointer on the resource or NULL if an error occured. */ - static appl::Highlight* keep(const std::string& _filename); - /** - * @brief release the keeped resources - * @param[in,out] reference on the object pointer - */ - static void release(appl::Highlight*& _object); + static ewol::object::Shared keep(const std::string& _filename); public: // herited function : virtual void updateContext() { // no upfate to do ... diff --git a/sources/appl/HighlightManager.cpp b/sources/appl/HighlightManager.cpp index c2c4b68..91e44cc 100644 --- a/sources/appl/HighlightManager.cpp +++ b/sources/appl/HighlightManager.cpp @@ -15,14 +15,14 @@ #undef __class__ #define __class__ "highlightManager" -static std::vector& s_list() { - static std::vector list; +static std::vector>& s_list() { + static std::vector> list; return list; } void appl::highlightManager::init() { - std::vector& hlList = s_list(); + std::vector>& hlList = s_list(); if (hlList.size() != 0) { APPL_ERROR("HighlightManager == > already exist, just unlink the previous ..."); hlList.clear(); @@ -40,7 +40,7 @@ void appl::highlightManager::init() { } std::string filename = list[iii]->getName() + "/highlight.xml"; APPL_DEBUG("Load xml name : " << filename); - appl::Highlight *myHightLine = appl::Highlight::keep(filename); + ewol::object::Shared myHightLine = appl::Highlight::keep(filename); if (myHightLine != NULL) { hlList.push_back(myHightLine); } else { @@ -59,19 +59,12 @@ void appl::highlightManager::init() { } void appl::highlightManager::unInit() { - std::vector& hlList = s_list(); + std::vector>& hlList = s_list(); if (hlList.size() == 0) { APPL_DEBUG("HighlightManager ==> no highlight"); hlList.clear(); return; } - for (int32_t iii = 0; iii < hlList.size(); ++iii) { - if (hlList[iii] == NULL) { - continue; - } - appl::Highlight::release(hlList[iii]); - hlList[iii] = NULL; - } hlList.clear(); } @@ -80,7 +73,7 @@ std::string appl::highlightManager::getTypeExtention(const std::string& _extenti return ""; } APPL_DEBUG("Try to find type for extention : '" << _extention << "' in " << s_list().size() << " types"); - std::vector& hlList = s_list(); + std::vector>& hlList = s_list(); for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; @@ -99,7 +92,7 @@ std::string appl::highlightManager::getFileWithTypeType(const std::string& _type if (_type.size() == 0) { return ""; } - std::vector& hlList = s_list(); + std::vector>& hlList = s_list(); for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; diff --git a/sources/appl/HighlightPattern.cpp b/sources/appl/HighlightPattern.cpp index 4767602..c5bcb9b 100644 --- a/sources/appl/HighlightPattern.cpp +++ b/sources/appl/HighlightPattern.cpp @@ -13,7 +13,7 @@ #undef __class__ #define __class__ "HighlightPattern" -appl::HighlightPattern::HighlightPattern(appl::GlyphPainting*& _glyphPainting) : +appl::HighlightPattern::HighlightPattern(const ewol::object::Shared& _glyphPainting) : m_glyphPainting(_glyphPainting), m_paternName(""), m_regExpStart(NULL), diff --git a/sources/appl/HighlightPattern.h b/sources/appl/HighlightPattern.h index fd8a702..6f8bdf4 100644 --- a/sources/appl/HighlightPattern.h +++ b/sources/appl/HighlightPattern.h @@ -29,10 +29,10 @@ enum resultFind { namespace appl { class HighlightPattern { private: - appl::GlyphPainting*& m_glyphPainting; + ewol::object::Shared m_glyphPainting; public: // Constructeur - HighlightPattern(appl::GlyphPainting*& _glyphPainting); + HighlightPattern(const ewol::object::Shared& _glyphPainting); ~HighlightPattern(); private: std::string m_paternName; //!< Current style name (like "c++" or "c" or "script Bash") diff --git a/sources/appl/TextPluginCtags.cpp b/sources/appl/TextPluginCtags.cpp index 202e84b..f3d21ed 100644 --- a/sources/appl/TextPluginCtags.cpp +++ b/sources/appl/TextPluginCtags.cpp @@ -27,7 +27,7 @@ appl::TextPluginCtags::TextPluginCtags() : m_bufferManager = appl::BufferManager::keep(); } appl::TextPluginCtags::~TextPluginCtags() { - appl::BufferManager::release(m_bufferManager); + } const char* eventJumpDestination = "event-plugin-ctags-jump-destination"; @@ -78,7 +78,7 @@ void appl::TextPluginCtags::jumpTo(const std::string& _name) { if (tagsFindNext (m_ctagFile, &entry) == TagSuccess) { APPL_INFO("Multiple file destination ..."); - appl::TagFileSelection* tmpWidget = new appl::TagFileSelection(); + ewol::object::Shared tmpWidget = ewol::object::makeShared(new appl::TagFileSelection()); if (NULL == tmpWidget) { APPL_ERROR("Can not allocate widget == > display might be in error"); } else { @@ -174,7 +174,7 @@ bool appl::TextPluginCtags::onReceiveMessage(appl::TextViewer& _textDrawer, } if (_msg.getMessage() == eventOpenCtagsFile) { APPL_INFO("Request opening ctag file"); - ewol::widget::FileChooser* tmpWidget = new ewol::widget::FileChooser(); + ewol::object::Shared tmpWidget = ewol::object::makeShared(new ewol::widget::FileChooser()); if (NULL == tmpWidget) { APPL_ERROR("Can not allocate widget == > display might be in error"); return true; diff --git a/sources/appl/TextPluginCtags.h b/sources/appl/TextPluginCtags.h index 1aa479d..85a1fb2 100644 --- a/sources/appl/TextPluginCtags.h +++ b/sources/appl/TextPluginCtags.h @@ -33,7 +33,7 @@ namespace appl { void printTag(const tagEntry *_entry); void jumpTo(const std::string& _name); void jumpFile(const std::string& _filename, int64_t _lineId); - appl::BufferManager* m_bufferManager; //!< handle on the buffer manager + ewol::object::Shared m_bufferManager; //!< handle on the buffer manager public: TextPluginCtags(); ~TextPluginCtags(); diff --git a/sources/appl/TextPluginData.h b/sources/appl/TextPluginData.h index 0766786..7afbff5 100644 --- a/sources/appl/TextPluginData.h +++ b/sources/appl/TextPluginData.h @@ -32,7 +32,7 @@ namespace appl { m_specificData.clear(); } private: - std::vector> m_specificData; + std::vector ,TYPE* >> m_specificData; protected: TYPE* getDataRef(appl::TextViewer& _textDrawer) { for (size_t iii = 0; iii < m_specificData.size() ; ++iii) { @@ -115,7 +115,7 @@ namespace appl { return; }; public: - virtual void onObjectRemove(ewol::Object* _removeObject) { + virtual void onObjectRemove(const ewol::object::Shared& _removeObject) { // TODO : plop }; }; diff --git a/sources/appl/TextPluginHistory.cpp b/sources/appl/TextPluginHistory.cpp index 00bcf4c..af6c7c5 100644 --- a/sources/appl/TextPluginHistory.cpp +++ b/sources/appl/TextPluginHistory.cpp @@ -176,7 +176,7 @@ bool appl::TextPluginHistory::onRemove(appl::TextViewer& _textDrawer, } -void appl::TextPluginHistory::onObjectRemove(ewol::Object* _removeObject) { +void appl::TextPluginHistory::onObjectRemove(const ewol::object::Shared& _removeObject) { // TODO : Dependence with buffer removing ... } diff --git a/sources/appl/TextPluginHistory.h b/sources/appl/TextPluginHistory.h index 33922d7..c3f29ad 100644 --- a/sources/appl/TextPluginHistory.h +++ b/sources/appl/TextPluginHistory.h @@ -67,7 +67,7 @@ namespace appl { void clearRedo(appl::PluginHistoryData& _data); void clearUndo(appl::PluginHistoryData& _data); public: - virtual void onObjectRemove(ewol::Object* _removeObject); + virtual void onObjectRemove(const ewol::object::Shared& _removeObject); }; }; diff --git a/sources/appl/init.cpp b/sources/appl/init.cpp index 8f53d34..4f888cd 100644 --- a/sources/appl/init.cpp +++ b/sources/appl/init.cpp @@ -126,16 +126,8 @@ bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) { */ void APP_UnInit(ewol::Context& _context) { APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)"); - ewol::object::Shared tmpWindows = _context.getWindows(); - _context.setWindows(NULL); - - if (NULL != tmpWindows) { - delete(tmpWindows); - tmpWindows = NULL; - } appl::textPluginManager::unInit(); - APPL_INFO("Stop Hightlight"); appl::highlightManager::unInit(); //Kill all singleton