LiFan
2024-10-18 7ac57009ceb55a1d5968f14b5da52dfa4d03e89f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include "jobject.hpp"
template<class Ty>
class JPtr :
    public JObject
{
public:
    JPtr(Ty* impl) :impl(impl) {}
    ~JPtr() {
        ((JObject*)impl)->Release();
    }
public:
    Ty* operator ->() {
        return impl;
    }
public:
    void Release() {}
private:
    Ty* impl;
};