Hi guys. Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected. Uko
Hi Yuriy, On 10 Apr 2014, at 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
Uko
I believe that you should use a WeakArray of size 1 for that. If you think of it, it is almost the same as a WeakValueHolder. Sven
On 10 avr. 2014, at 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
If a class is weak it is also variable. So you have basically two solutions. If your variable is an instance variable, you can declare that your class is weak and initialize it with a size of 1, the fixed fields will remain strong, only the indexed field will be weak. You can have a look at WeakKeyAssociation and WeakValueAssociation for examples. Otherwise, you can wrap your variable into a weak array of size 1. Later slots will be able to do the job transparently.
Uko
On 10 April 2014 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
There's no week pointers, only day, month or year ;) See WeakArray Uko
-- Best regards, Igor Stasenko.
Am 10.04.2014 um 12:40 schrieb Igor Stasenko <siguctua@gmail.com>:
On 10 April 2014 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote: Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
There's no week pointers, only day, month or year ;)
Hmmm | weekPointer | weekPointer := Week new. seems to work well. Norbert
On 10 April 2014 13:05, Norbert Hartl <norbert@hartl.name> wrote:
Am 10.04.2014 um 12:40 schrieb Igor Stasenko <siguctua@gmail.com>:
On 10 April 2014 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
There's no week pointers, only day, month or year ;)
Hmmm
| weekPointer | weekPointer := Week new.
lol.. /me learned something new today :)
At least title is ok :) On 10 Apr 2014, at 13:15, Igor Stasenko <siguctua@gmail.com> wrote:
On 10 April 2014 13:05, Norbert Hartl <norbert@hartl.name> wrote:
Am 10.04.2014 um 12:40 schrieb Igor Stasenko <siguctua@gmail.com>:
On 10 April 2014 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote: Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
There's no week pointers, only day, month or year ;)
Hmmm
| weekPointer | weekPointer := Week new.
lol.. /me learned something new today :)
As long as a couple of non-native English speakers are making fun of each other, it's OK ;-) On 10 Apr 2014, at 13:19, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
At least title is ok :)
On 10 Apr 2014, at 13:15, Igor Stasenko <siguctua@gmail.com> wrote:
On 10 April 2014 13:05, Norbert Hartl <norbert@hartl.name> wrote:
Am 10.04.2014 um 12:40 schrieb Igor Stasenko <siguctua@gmail.com>:
On 10 April 2014 10:50, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote: Hi guys.
Is there a way to have a week pointer? Or some wrapper with a week pointer? I know that there are week collections, but I what to have a âvariableâ that wonât prevent the object it points to be garbage collected.
There's no week pointers, only day, month or year ;)
Hmmm
| weekPointer | weekPointer := Week new.
lol.. /me learned something new today :)
didnât you saw my screencast? enGrish rulez big time <:o) On Apr 10, 2014, at 12:36 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2014-04-10 8:21 GMT-03:00 Sven Van Caekenberghe <sven@stfx.eu>:
As long as a couple of non-native English speakers are making fun of each other, it's OK ;-)
We're the majority I think.
No, can you give me a link? On 10 Apr 2014, at 23:38, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
didnât you saw my screencast?
enGrish rulez big time
<:o)
On Apr 10, 2014, at 12:36 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2014-04-10 8:21 GMT-03:00 Sven Van Caekenberghe <sven@stfx.eu>:
As long as a couple of non-native English speakers are making fun of each other, it's OK ;-)
We're the majority I think.
participants (7)
-
Camille Teruel -
Esteban A. Maringolo -
Igor Stasenko -
Norbert Hartl -
Sebastian Sastre -
Sven Van Caekenberghe -
Yuriy Tymchuk