add LeakDetector feature to luajit::Context, luajit::Thread, and nf7::Lambda
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// No copyright
|
||||
#include "core/luajit/context.hh"
|
||||
|
||||
#include "iface/common/leak_detector.hh"
|
||||
#include "iface/subsys/concurrency.hh"
|
||||
#include "iface/subsys/parallelism.hh"
|
||||
|
||||
@@ -52,7 +53,9 @@ void TaskContext::Push(const nf7::Value& v) noexcept {
|
||||
|
||||
namespace {
|
||||
template <typename T>
|
||||
class ContextImpl final : public Context {
|
||||
class ContextImpl final :
|
||||
public Context,
|
||||
private LeakDetector<ContextImpl<T>> {
|
||||
public:
|
||||
ContextImpl(const char* name, Kind kind, Env& env)
|
||||
: Context(name, kind), tasq_(env.Get<T>()) {
|
||||
|
@@ -8,11 +8,15 @@
|
||||
|
||||
#include <lua.hpp>
|
||||
|
||||
#include "iface/common/leak_detector.hh"
|
||||
|
||||
#include "core/luajit/context.hh"
|
||||
|
||||
namespace nf7::core::luajit {
|
||||
|
||||
class Thread : public std::enable_shared_from_this<Thread> {
|
||||
class Thread :
|
||||
public std::enable_shared_from_this<Thread>,
|
||||
private LeakDetector<Thread> {
|
||||
public:
|
||||
struct DoNotCallConstructorDirectly { };
|
||||
|
||||
|
@@ -6,13 +6,14 @@
|
||||
#include <vector>
|
||||
|
||||
#include "iface/common/dealer.hh"
|
||||
#include "iface/common/leak_detector.hh"
|
||||
#include "iface/common/exception.hh"
|
||||
#include "iface/common/observer.hh"
|
||||
#include "iface/common/value.hh"
|
||||
|
||||
namespace nf7 {
|
||||
|
||||
class Lambda {
|
||||
class Lambda : private LeakDetector<Lambda> {
|
||||
public:
|
||||
Lambda() = delete;
|
||||
Lambda(const std::shared_ptr<Taker<Value>>& taker,
|
||||
|
Reference in New Issue
Block a user