Re: LDC2 and classic profiling

2019-05-10 Thread Denis Feklushkin via Digitalmars-d-learn
On Friday, 10 May 2019 at 18:09:28 UTC, Johan Engelen wrote: You only need `-fprofile-instr-generate` for generating default.profraw. Yep, it is because I also tried to use uftrace and xray contains only calls to external libraries That's impossible, because those are exactly _not_ profi

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Rumbu via Digitalmars-d-learn
On Friday, 10 May 2019 at 19:10:05 UTC, Machine Code wrote: Well, I've had similar issue. The error message says "access denied" which I believe refers to the tmp directory; i.e, the user that is running your executable has no permissions to delete that file. Well, this has nothing to do with

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Machine Code via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and remov

Re: LDC2 and classic profiling

2019-05-10 Thread Johan Engelen via Digitalmars-d-learn
On Friday, 10 May 2019 at 14:00:30 UTC, Denis Feklushkin wrote: Build with dub some package. Profiling are enabled by dub.json: "dflags-ldc": ["-fprofile-instr-generate", "-finstrument-functions", "-cov"], Resulting default.profraw (and generated default.profdata) contains only calls to exte

Re: In what situation can new Struct() return null?

2019-05-10 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, May 10, 2019 at 05:32:25PM +, faissaloo via Digitalmars-d-learn wrote: > On Friday, 10 May 2019 at 12:19:29 UTC, Cym13 wrote: > > On Friday, 10 May 2019 at 10:11:51 UTC, faissaloo wrote: > > > My program contains the following statement: > > > auto newChildNode = new Node(); > > >

Re: In what situation can new Struct() return null?

2019-05-10 Thread faissaloo via Digitalmars-d-learn
On Friday, 10 May 2019 at 12:19:29 UTC, Cym13 wrote: On Friday, 10 May 2019 at 10:11:51 UTC, faissaloo wrote: My program contains the following statement: auto newChildNode = new Node(); In debugging I have found that this pointer evaluates to null, what could cause this? I should have ple

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Friday, 10 May 2019 at 15:06:46 UTC, Temtaime wrote: Lol, you don't have to load and unload the curl dll. std.net.curl have its own lazy libcurl loader. But i'm not sure if it tries to find the dll in the temp directory. If it is the case, then it simply doesn't unload the dll when you have

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Temtaime via Digitalmars-d-learn
Lol, you don't have to load and unload the curl dll. std.net.curl have its own lazy libcurl loader. But i'm not sure if it tries to find the dll in the temp directory. If it is the case, then it simply doesn't unload the dll when you have called some function from it.

Re: [windows] Can't delete a closed file?

2019-05-10 Thread wjoe via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and remov

LDC2 and classic profiling

2019-05-10 Thread Denis Feklushkin via Digitalmars-d-learn
Build with dub some package. Profiling are enabled by dub.json: "dflags-ldc": ["-fprofile-instr-generate", "-finstrument-functions", "-cov"], Resulting default.profraw (and generated default.profdata) contains only calls to external libraries, but not my internal functions calls. Why?

Re: In what situation can new Struct() return null?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Friday, 10 May 2019 at 10:11:51 UTC, faissaloo wrote: My program contains the following statement: auto newChildNode = new Node(); In debugging I have found that this pointer evaluates to null, what could cause this? I should have plenty of memory, my only other idea is some sort of hea

In what situation can new Struct() return null?

2019-05-10 Thread faissaloo via Digitalmars-d-learn
My program contains the following statement: auto newChildNode = new Node(); In debugging I have found that this pointer evaluates to null, what could cause this? I should have plenty of memory, my only other idea is some sort of heap corruption.

Blog Post #0034 - A Singleton AccelGroup

2019-05-10 Thread Ron Tarrant via Digitalmars-d-learn
In today's blog post is an example of how to use a singleton for the AccelGroup, so you don't have to pass a reference down through a gazillion levels to get it to the MenuItems. It's right here: http://gtkdcoding.com/2019/05/10/0034-accelgroup_singleton.html

Re: Erasing passwords from ram?

2019-05-10 Thread Dukc via Digitalmars-d-learn
On Thursday, 9 May 2019 at 19:10:04 UTC, Nick Sabalausky wrote: On Tuesday, 30 April 2019 at 08:15:15 UTC, Dukc wrote: I am currently programming a server. So I got the idea that after I've generated all the hashes I need from a password, I want to erase it from RAM before discarding it, just t

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Seb via Digitalmars-d-learn
On Friday, 10 May 2019 at 08:07:32 UTC, Cym13 wrote: Which C runtime are you using? The old and buggy DigitalMars one or the official MS one? I really don't know, how can I find out? I litterally just used dmd on the script above with no special options then ran the resulting exe. Yeah, so

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Friday, 10 May 2019 at 07:09:45 UTC, Seb wrote: On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: [...] You could try to use the find handle function in Process Explo

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 15:05:10 UTC, Andre Pany wrote: Can you reproduce the issue with other Dlls or is it only reproducible with curl dll? Does the issue with curl dll also exists if you do not call the curl function? Kind regards Andre I didn't have the time to test with another dll j

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Seb via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: [...] You could try to use the find handle function in Process Explorer to figure out what process has the file open: