Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
3 answers
123 views

There's a whole page on the Tcl wiki, but there are a lot of examples and it's hard for me to find them. Here are two simple cases that I often use: Tcl_Obj *innerObj = NULL; innerObj = Tcl_NewListObj(...
Mkn's user avatar
  • 668
0 votes
1 answer
104 views

I have a Scene struct holding resources for the program and Objects referencing resources of the scene and also being owned by the scene. So the resources are wrapped in Rc<>. Rust playground ...
0 votes
0 answers
21 views

In OpenCL (let's say v3.0), I know one can create contexts using sub-devices. But - what happens if you release all references to a sub-device while the context is not released (i.e. has positive ...
0 votes
1 answer
63 views

In this pycon conference the presenter says that ctypes.c_long.from_address(id(SOME_OBJECT)).value would yields the reference count of an object. I tried to find this in the documentation but found ...
0 votes
1 answer
141 views

Is this code safe knowing that: Header_mark_as_shared is always only called before an object crosses to other threads, no matter in which thread it resides in The first call to Header_mark_as_shared ...
3 votes
2 answers
253 views

Giving the following constraints, is the optimization in this code correct? before an object is transfered to another thread, its reference count is incremented and is_shared is set to true. ...
0 votes
0 answers
44 views

I am still a bit newer to rust and have been getting some practice through Advent of code problems. I am curious if anyone would be able to explain to my why the borrow checker is dislikes the ...
2 votes
1 answer
91 views

I was experimenting with refcount of objects, and I noticed the reference count of None object does not change when I bind identifiers to None. I observed this behavior in python version 3.13. Python ...
1 vote
1 answer
125 views

There is probably no way this is the first time someone has asked this question, but for the life of me I couldn't find this answer. So I want to ask this in the hope that someone will either harshly ...
2 votes
1 answer
106 views

IncRef: refcount.fetch_add(1, std::memory_order_relaxed) DecRef: if (refcount.load(std::memory_order_relaxed) == 1 || refcount.fetch_sub(1, std::memory_order_release) == 1) { std::...
0 votes
0 answers
52 views

a bit related to In Objective-C MRR, if foo is a retain property, then self.foo = [[Foo alloc] init] will need to be released immediately? suppose you have @property (nonatomic, readwrite, retain) ...
0 votes
1 answer
97 views

get_user_pages() increments the page reference count. And that is why it can pin the page in memory. So I wonder whether the pages obtained by get_user_pages() can be directly recycled or swapped out ...
0 votes
2 answers
127 views

I'm writing a bit of code that uses Rc<String>. I'm pretty sure that using this would create an extra pointer indirection, with one pointer to the Rc, which has a pointer to String, which is a ...
6 votes
0 answers
136 views

I was reading the Python 3.12 official documentation on the sys module, and the part about getrefcount() seems rather confusing to me (emphasis mine). Return the reference count of the object. The ...
0 votes
0 answers
53 views

To improve my understanding of Cython, I am trying to find a way to directly access the fields of the objects defined by CPython. For example, I wrote the following code to access the ob_item field of ...

15 30 50 per page
1
2 3 4 5
...
33

AltStyle によって変換されたページ (->オリジナル) /