Re: GC has a barbaric destroyng model, I think

2015-02-11 Thread Orvid King via Digitalmars-d-learn
On Wednesday, 11 February 2015 at 21:34:00 UTC, Andrey Derzhavin 
wrote:
   If we are using a DMD realization of destroying of 
objects, happens the following: at the calling the «destroy» 
method the calling of dtor takes place always, and then the 
object which is being destroyed is initialized by the default 
state. In other words, after calling «destroy» method, there is 
no way of getting an access to the members of the object that 
is being destroyed (it is meant, that the members are the 
references). GC works the same way.
	This approach in case of manual calling of «destroy» method 
has predictable and understandable consequences (there is no 
reasone to use the object being destroyed). But if GC performes 
the destroying of the objects, a lot of errors appear at the 
accessing to the members which are references, because some of 
them have already been destroyed (access to the members is 
realized in dtors). Such situations can be avoided, by using 
«@nogc» keyword. Howewer «@nogc» keyword doesn't protect us 
from using the references in dtors: we can assign some values 
to the refernces, we can have access to some members by the 
references and assign them some values.That is not correct in 
itself.


If GC starts destroying some group of the objects, it could be 
more correct, if the calls of dtros are occured of all objects 
in a group before phisical memory releasing. Or GC must call 
dtors of the objetcts only, which noone refers to.


The finalization order issue is one that is actually rather 
difficult, if not impossible, to solve without a precise GC. It 
gets even more complicated when you have to deal with cyclic 
references in finalizable allocations.


Re: Why is rehash not @safe?

2014-08-30 Thread Orvid King via Digitalmars-d-learn

On 8/30/2014 9:27 AM, Nordlöw wrote:

I just noticed that AA rehash is @system. Is there a reason for this? Is
it system because bad things can happen or simply because it's a low
level function? Should I always tag functions calling rehash as @trusted?


Rehash itself would have to be marked @trusted rather than @safe if 
anything.


Re: Down the VisualD0.3.38-1.exe ,found virus!

2014-05-09 Thread Orvid King via Digitalmars-d-learn
Trend Micro and Comodo have (from my limited experience) been pretty
good about dealing with false positives, so does anyone want to inform
them and the others as well?

On 5/8/14, sigod via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
 On Friday, 9 May 2014 at 01:02:39 UTC, FrankLike wrote:
 Hi,everyone,
 down VisulaD from
 http://rainers.github.io/visuald/visuald/StartPage.html
 found the virus:Win32.Troj.Undef.(kcloud)

 Why?

 Frank

 https://www.virustotal.com/en/file/bbd76ddb41a80f0526f6cf1e37a2db2736cfa8f29ed3f5fd7a4336bf4c8bbe43/analysis/

 Just 5 of 52. Probably a false alarm.