Skip to content

Commit 4d03e4b

Browse files
committed
rt: Remove smart_ptr. Unused
1 parent c28c258 commit 4d03e4b

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/rt/rust_internal.h

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -130,40 +130,6 @@ template <typename T> struct task_owned {
130130
}
131131
};
132132

133-
template<class T>
134-
class smart_ptr {
135-
T *p;
136-
137-
public:
138-
smart_ptr() : p(NULL) {};
139-
smart_ptr(T *p) : p(p) { if(p) { p->ref(); } }
140-
smart_ptr(const smart_ptr &sp) : p(sp.p) {
141-
if(p) { p->ref(); }
142-
}
143-
144-
~smart_ptr() {
145-
if(p) {
146-
p->deref();
147-
}
148-
}
149-
150-
T *operator=(T* p) {
151-
if(this->p) {
152-
this->p->deref();
153-
}
154-
if(p) {
155-
p->ref();
156-
}
157-
this->p = p;
158-
159-
return p;
160-
}
161-
162-
T *operator->() const { return p; };
163-
164-
operator T*() const { return p; }
165-
};
166-
167133
template <typename T> struct kernel_owned {
168134
inline void *operator new(size_t size, rust_kernel *kernel,
169135
const char *tag);

0 commit comments

Comments
 (0)