How to handle allocation of 0 byte of memory in String.new?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to handle allocation of 0 byte of memory in String.new?

Henoktes722
The string test shows a result as expected only when I delete the code for allocating 0 byte of memory.

        let s = String.new(0);
        do s.dispose();

Like when I delete this, It works fine. But It shows ERR2 if I try to allocate 0 byte of memory.

How can I handle that?
Reply | Threaded
Open this post in threaded view
|

Re: How to handle allocation of 0 byte of memory in String.new?

WBahn
Administrator
How does your Memory library handle being asked to allocate a block of memory of zero size?