digitalmars.D.learn - Is it bug compiler?
- MGW (18/18) May 12 2016 Windows 7 32bit
- Steven Schveighoffer (3/10) May 12 2016 This allocates. Allocations are not allowed in GC collection cycle.
- Vladimir Panteleev (2/20) May 12 2016 No. Look at the documentation of InvalidMemoryOperationError.
Windows 7 32bit
-----------------------
import std.stdio;
import std.conv;
class CFormaMain {
~this() {
char[] zz = [ 'A', 'B', 'C' ];
writeln(to!string(zz));
}
}
int main(string[] args) {
CFormaMain formaMain;
formaMain = new CFormaMain();
return 0;
}
-----------------------
core.exception.InvalidMemoryOperationError src\core\exception.d(693): Invalid me
mory operation
May 12 2016
On 5/12/16 9:20 AM, MGW wrote:
Windows 7 32bit
-----------------------
import std.stdio;
import std.conv;
class CFormaMain {
~this() {
char[] zz = [ 'A', 'B', 'C' ];
This allocates. Allocations are not allowed in GC collection cycle.
-Steve
May 12 2016
On Thursday, 12 May 2016 at 13:20:35 UTC, MGW wrote:
Windows 7 32bit
-----------------------
import std.stdio;
import std.conv;
class CFormaMain {
~this() {
char[] zz = [ 'A', 'B', 'C' ];
writeln(to!string(zz));
}
}
int main(string[] args) {
CFormaMain formaMain;
formaMain = new CFormaMain();
return 0;
}
-----------------------
core.exception.InvalidMemoryOperationError src\core\exception.d(693): Invalid
me
mory operation
No. Look at the documentation of InvalidMemoryOperationError.
May 12 2016









Steven Schveighoffer <schveiguy yahoo.com> 