improve the timer that it can be deleted in elapse handler
This commit is contained in:
@@ -48,7 +48,7 @@ namespace nana
|
||||
template<typename Function>
|
||||
void elapse(Function && fn)
|
||||
{
|
||||
elapse_.connect(std::forward<Function>(fn));
|
||||
elapse_->connect(std::forward<Function>(fn));
|
||||
}
|
||||
|
||||
void reset();
|
||||
@@ -66,7 +66,7 @@ namespace nana
|
||||
private:
|
||||
unsigned _m_interval() const;
|
||||
private:
|
||||
nana::basic_event<arg_elapse> elapse_;
|
||||
std::shared_ptr<nana::basic_event<arg_elapse>> elapse_;
|
||||
implement * const impl_;
|
||||
};
|
||||
}//end namespace nana
|
||||
|
||||
Reference in New Issue
Block a user