In an effort to please the both of you, I replaced the BamWriters pointer with a singly linked list locked using an atomic tagged pointer. This means it is locked on a per-instance level while not consuming any extra memory. And in the common case of there being only one BamWriter, this still saves about 40 bytes per TypedWritable pointer on my system. Probably overkill, but there ya go.
In an effort to please the both of you, I replaced the BamWriters pointer with a singly linked list locked using an atomic tagged pointer. This means it is locked on a per-instance level while not consuming any extra memory. And in the common case of there being only one BamWriter, this still saves about 40 bytes per TypedWritable pointer on my system. Probably overkill, but there ya go.
Diff: /github. com/panda3d/ incremental/ commit/ 63336dfdda0f361 d5e249f2a9f2497 4ad96ca177
https:/