|
In other words, how does the implementation keeps track of the count?
Is there a map-like object maintained which is accessible by all the shared_ptr instances whose key is the pointer's address and value is the number of references? If I've to implement...
Started by vito on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Each....
Creating a memory leak with reference-counting smart than one object at a time.
When you make copy of shared_ptr object it copy pointer with count of references, increase it, and copy pointer on contained object.
counting.
|
|
I feel that both are the same thing, but I am not sure.
Started by Thanks on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In objective-c the retain method is used to increment the reference count so the terms reference count and retain count are interchangeable, they are synonymous:
http....
Reference counting is a technique for resource management.
|
|
In purely functional languages, data is immutable. With reference counting, creating a reference cycle requires changing already created data. It seems like purely functional languages could use reference counting without worrying about the possibility...
Started by Zifre on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Reference counting....
I'm not saying a ref counting mechanism is impossible with a circular.
And GC most of the time with the possibility of circular references .
Reference counting is MUCH slower than GC because it's not good for CPU.
|
Ask your Facebook Friends
|
Modern ATL/MFC applications now have access to a new shared pointer class called CAutoPtr, and associated containers (CAutoPtrArray, CAutoPtrList, etc.).
Does the CAutoPtr class implement reference counting?
Started by Rob on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Using boost::shared.
Having checked the CAutoPtr source, no, reference counting is not supported.
|
|
I come to know that when many objects shares same data and creation and desturction of objects are expensive then one can go for reference counting .
Can anybody give input about how to achieve it for the library class which cant be changed ?.
Started by Mac on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The Wikipedia article on referencing counting states it better than I could:
The main advantage of reference counting over tracing garbage collection is that objects are reclaimed as soon as they can memory, this is important to maintain....
|
|
Re: Count via Pictures! - TEST THREAD FOR A COUNTING GAME
Louis XVI (16th)
Kouta commands you to die!
Started by Neltharion S. Deathwing on
, 15 posts
by 8 people.
Answer Snippets (Read the full thread at bulbagarden):
Stats Re: Count via Pictures! - TEST THREAD FOR A COUNTING GAME
Kouta commands you to die! Re: Count via cats? Join the cat ....
Re: Count via Pictures! - TEST THREAD FOR A COUNTING GAME
COOKIE MONSTER PAINTS 17 COOKIES.
|
|
RAII = Resource Acuquisation is Initialitazation Ref Counting = "poor man's GC"
Together, they are quite powerful (like a ref-counted 3D object holding a VBO, which it throws frees when it's destructor is called).
Now, question is -- does RAII exist in...
Started by anon on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Perl, python (C), php, and tcl are reference counted and have mechanisms to destroy an....
I believe Python and Lua use reference counting.
Perl 5 has ref counting.
Getting D to work was a pain in the butt for me so IM JUST SAYING .
|
|
I have an INSERT query that is pulling data from two tables and inserting that data into a third table. Everything appears to be working fine except that the COUNT part of the query isn't returning the results I would expect.
The first set of tables this...
Started by Bryan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The COUNT function will count all rows in the database.
This should solve your immediate problem
Count(DISTINCT MIUsInGrid" & i & ".MIUID)
The naked COUNT the tables and this will provide unexpected results.
|
|
I would like to track how many surveys have been done by different departments at work. This is fairly easy to do by using "Group by" and counting the number of matches.
SELECT Departments.DepartmentName, count(*) as [survey count] FROM Departments INNER...
Started by Brad on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
SELECT Departments.DepartmentName, count(Surveys.DepartmentID) as [survey count] FROM Departments BY Departments.DepartmentName
SELECT Departments.DepartmentName, count(Surveys.*) as [survey count] FROM Departments BY Departments....
|
|
Hi
In shared_ptr smart pointer, reference counting is used. However, reference counting has a problem, that it can't break cycles of reference.
I have four questions with this issue.
1) Could anybody offer me one snippet in which the cycles of reference...
Started by skydoor on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
As such, a weak_ptr gives you.
Object (so the object has a nonzero reference count and still exists).
|