gomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gomd-devel] <TECH> working on smartPointers support


From: Gian Paolo Ghilardi
Subject: [gomd-devel] <TECH> working on smartPointers support
Date: Sun, 5 Oct 2003 23:40:34 +0200

Hi all.

I've just added a preliminar (unstable) smartPointer class for the whole
project.
BTW a smartPointer is a special pointer (created via a class) that does
something special. :)
My implementation is based on a reference counter.
We have an increment of the references when something accesses or calls the
smart pointer.
We have a decrement when the pointer is used no more by a "caller".
When the reference counter reaches the 0, the smart pointer invokes the
autocleaning so no memory leak can occur.

Unfortunately this adavanced tecnique requires thread-safety and I've a
problem with a thread while using the libgomd to get a value from remote
host. Other stuff does work without faultlessy.

However my implementation does work and you can see smart pointers killed =>
really nice to see connHandlers autocleaning themself... ;)

I hope to find the problem and to fix that because smartPointers are really
_cool_.

>> Obviously no CVS commit was done. <<

PS for Max: can you help me with this stuff?

Byez.

<rejected>

REFERENCE LINKS:
- http://www.gamedev.net/reference/articles/article1060.asp
- http://babbage.cs.qc.edu/STL_Docs/templates.htm
- http://www.jelovic.com/articles/smart_pointer_thread_safety.htm
- http://www.glenmccl.com/tip_014.htm
- http://ootips.org/yonat/4dev/smart-pointers.html
- http://www.mike95.com/c_plusplus/tutorial/templates/functions.aspx









reply via email to

[Prev in Thread] Current Thread [Next in Thread]