Re: Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
On Thursday, 3 August 2017 at 15:29:29 UTC, Adam D. Ruppe wrote: On Thursday, 3 August 2017 at 15:18:17 UTC, Michael wrote: I've not seen that either, though I'm not a C++ programmer. Does using free() on its own not assume access of a global namespace? Consider the following: class Foo {

Re: Why free and realloc seem to include .

2017-08-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 3 August 2017 at 15:18:17 UTC, Michael wrote: I've not seen that either, though I'm not a C++ programmer. Does using free() on its own not assume access of a global namespace? Consider the following: class Foo { void free(void*); void other_method() { free(ptr); //

Re: Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
On Thursday, 3 August 2017 at 14:15:40 UTC, Temtaime wrote: On Thursday, 3 August 2017 at 14:03:56 UTC, Michael wrote: So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: [...] and I was just wondering why

Re: Why free and realloc seem to include .

2017-08-03 Thread Temtaime via Digitalmars-d-learn
On Thursday, 3 August 2017 at 14:03:56 UTC, Michael wrote: So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: if (srcfile._ref == 0) .free(srcfile.buffer); srcfile.buffer = null; srcfile.len = 0; and I was

Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: if (srcfile._ref == 0) .free(srcfile.buffer); srcfile.buffer = null; srcfile.len = 0; and I was just wondering why certain functions seem to be called