473,473 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

flyweight reference counting

ash
hi

does anyone has any experience with flyweight pattern with refernce
counting

i want to share objects between multiple clients and want to delete
the object from shared pool when the last client deletes a refernce to
it
Jul 19 '05 #1
1 2685
> does anyone has any experience with flyweight pattern with refernce
counting
I think this is OT but:

Not the flyweight pattern gc'tor exactly.

More of a differential or cyclic weighted pattern:

http://groups.google.com/groups?selm...crnsc02&rnum=1

atomic_ptr collector uses an atomic differential reference count.

My collector collects multi-objects using a single proxy reference count.

Those garbage collectors will give you an idea on how to write fast,
race-condition free, atomic garbage collected objects without having to use
separate threads, or any damn mark-and-sweep type crap.

Enjoy!

i want to share objects between multiple clients and want to delete
the object from shared pool when the last client deletes a refernce to
it


It depends on how you want to share you objects. You may not even need
special reference counting. You might be able to use "normal" reference
counting...

--
The designer of the experimental, SMP and HyperThread friendly, AppCore
library.

http://AppCore.home.comcast.net
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Elbert Lev | last post by:
Please correct me if I'm wrong. Python (as I understand) uses reference counting to determine when to delete the object. As soon as the object goes out of the scope it is deleted. Python does...
27
by: Jason Heyes | last post by:
To my understanding, std::vector does not use reference counting to avoid the overhead of copying and initialisation. Where can I get a reference counted implementation of std::vector? Thanks.
0
by: Kalle Rutanen | last post by:
Hello I implemented reference counting in my program, and found out many problems associated with it. I wonder if the following problems can be solved automatically rather manually ? 1. ...
1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
4
by: aaronfude | last post by:
Hi, Please consider the following class (it's not really my class, but it's a good example for my question): class Vector { int myN; double *myX; Vector(int n) : myN(n), myX(new double) { }...
0
by: FluffyCat | last post by:
Yesterday I continued my series of design patterns examples using PHP 5 with the Bridge Pattern. Here now is my 18th design pattern example, the Flyweight Pattern. ...
1
by: oec.deepak | last post by:
Hi Cn any one telll me what is Reference counting in C++.
0
by: Arthur | last post by:
hey all, imagine the following: a screen full of circles. each circle has coordinates and a style. the coordinates are always different, a style can be the same among 0 to many circles. ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.