weak pointer
- From: "Bram Neijt" <bneijt gmail com>
- To: "GTKmm mailinglist" <gtkmm-list gnome org>
- Subject: weak pointer
- Date: Sat, 21 Jul 2007 19:28:10 +0200
Hi developers,
I need a weak pointer in glibmm. I was thinking about something like:
template <typename Tobj>
class WeakPtr: private RefPtr<Tobj>
{
RefPtr<Tobj> a;
public:
WeakPtr(other RefPTr)
{
a = reptr;
a.cppObject->unreference();
}
RefPtr<Tobj> lock()
{
//Try to get a valid RefPtr from a
//if it's not valid, throw an error.
}
};
Would it be possible to start a discussion about the full
implementation and get this into glibmm if I put in some effort to
implement it more correctly?
Greets,
Bram
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]