tag 組合模式

標籤
貢獻2
18
03:42 PM · Nov 21 ,2025

@組合模式 / 博客 RSS 訂閱

journey - YARN中Service組合模式

1、實例 1.1、定義一個Service接口 public interface Service { void init(Configuration config); void start(); void stop(); } 1.2、定義一個AbstractService抽象類 public abstract class AbstractService implements

組合模式 , yarn

收藏 評論

華為雲開發者聯盟 - 構造、析構期間被調虛函數發生的慘案,長教訓!

最近有個問題出現長達一個月,經過兩次修改未能解決,大致場景如下: 一個多態對象Children被註冊回調(m_observer對象位於基類Base中),正好在析構函數裏面回調,導致crash。 class Base { // ... protected: std::shared_ptrObserver m_observer; } class Children: public Ba

code , bug , 組合模式 , 回調函數 , 多態

收藏 評論