25æ¥ã®è¨äºã®ã³ã¡ã³ã㧠default_delete ã®ç¹æ®åã§è§£æ±ºããæ¹æ³ãæãã¦ããã ãã¾ããããããã¨ããããã¾ãã å人çã¡ã¢ã¨ãã¦ä»ã®æç¥ã£ã¦ã unique_ptr ã®ããªã¼ã¿æå®æ¹æ³ãçºãã¦ããã¾ãã 1ï¼é¢æ°ãªãã¸ã§ã¯ãã渡ã ä¸çªã¡ã¸ã£ã¼ãªæ¹æ³ãé¢æ°ãªãã¸ã§ã¯ããä½ã£ã¦ default_delete ã®ä»£ããã«æå®ãã¾ãã struct master_voice_deleter { void operator()( IXAudio2MasteringVoice* voice ) const { voice->DestroyVoice(); } }; std::unique_ptr< IXAudio2MasteringVoice, master_voice_deleter > ptr; 2. default_delete ã®ç¹æ®åã§è§£æ±º default_delete ãã
{{#tags}}- {{label}}
{{/tags}}