[Issue 1326] Garbage Collector dysfunction - Memory leak in gc_term() with DLLs - and more.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 10 00:42:23 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1326





------- Comment #2 from wqeqweuqy at hotmail.com  2007-07-10 02:42 -------
(In reply to comment #1)
> I tried this with 3):
> -----------------------
> import std.c.windows.com;
> 
> interface I { }
> 
> class Foo : ComObject, public I { }
> 
> void main()
> {
>     Foo f = new Foo();
> }
> ---------------------
> and instrumented _d_newclass(). The test:
>  if (ci.flags & 1){} // if COM object
> is triggered properly. If you could check it for your explicit case, that would
> be helpful, as I cannot reproduce the problem.
> 

Ah yea, this one is my fault (ci.flags was 0b101). I wrongly assumed the GC
would gc.addRange() the object for you - manually doing it fixed things. Sorry
about that! 


-- 



More information about the Digitalmars-d-bugs mailing list