Re: Deallocate array?

2013-05-10 Thread Matic Kukovec
Thanks for the explanation guys. Hope there will be improvements in D's GC in the future. Also "delete temp_array" also works instead of "GC.free(temp_array.ptr)". And you also need to call "GC.minimize()" after a delete/GC.free() if you want to shrink the memory use after the for loop:

Re: Deallocate array?

2013-05-10 Thread Steven Schveighoffer
On Fri, 10 May 2013 04:44:14 -0400, Matic Kukovec wrote: Thanks for the explanation guys. Hope there will be improvements in D's GC in the future. Also "delete temp_array" also works instead of "GC.free(temp_array.ptr)". And you also need to call "GC.minimize()" after a delete/GC.free() if

Get difficulties with variadics

2013-05-10 Thread Flamaros
I am using a variadic function for a resource manager to be able to load resources with custom parameters. My problem is I don't get the second parameter correctly, i am expecting to retrieve a dynamic array. [CODE] class ResourceManager TgetResource(T : IResource)(string filePath, ..

how to avoid memory leaking

2013-05-10 Thread maarten van damme
I'm trying to generate images and after displaying them I want to save them to a png file. I use parallelism to generate them asynchronously with the gui-thread to avoid blocking (don't know if this is really relevant). If I add a single line in the method where I generate the image that creates a

1 compiler error without error message

2013-05-10 Thread Jonathan Dunlap
Building Solution: DFizzBuzz (Debug) Building: DFizzBuzz (Debug) Performing main compilation... Current dictionary: C:\D\Projects\DFizzBuzz\DFizzBuzz C:\D\dmd2\windows\bin\dmd.exe -debug -gc "main.d" "-IC:\D\dmd2\src\druntime\import" "-IC:\D\dmd2\src\phobos" "-odobj\Debug" "-ofC:\D\Project

Re: Get difficulties with variadics

2013-05-10 Thread evilrat
On Friday, 10 May 2013 at 21:11:57 UTC, Flamaros wrote: In the load(...) method I am getting filePath without issue, but for next parameters I am little confused on how to do. what all that stuff in ur load method? O_O look at my example in this thread, that at least should give you idea on

Re: 1 compiler error without error message

2013-05-10 Thread Maxim Fomin
On Saturday, 11 May 2013 at 01:18:47 UTC, Jonathan Dunlap wrote: This looks like already fixed in git head incorrect error gagging. With latest dmd it prints: DMD v2.063-devel-1215bc3 DEBUG /usr/include/d/dmd/phobos/std/algorithm.d(404): Error: function std.algorithm.MapResult!(adjoin, Result