Re: Unittests pass, and then an invalid memory operation happens after?

2024-04-03 Thread Liam McGillivray via Digitalmars-d-learn
On Friday, 29 March 2024 at 01:18:22 UTC, H. S. Teoh wrote: Take a look at the docs for core.memory.GC. There *is* a method GC.free that you can use to manually deallocate GC-allocated memory if you so wish. Keep in mind, though, that manually managing memory in this way invites memory-relate

Re: How can I get an identifiquer of an usb or a harddisk? using C or Cpp or Dlang

2024-04-03 Thread dany via Digitalmars-d-learn
On Wednesday, 3 April 2024 at 00:20:51 UTC, Jonathan M Davis wrote: On Monday, April 1, 2024 5:37:56 PM MDT dany via Digitalmars-d-learn wrote: Actually I would get an ID's Usb That's going to depend on the operating system, and it's also going to depend on exactly what kind of ID you're look

How best to implement items and weapons in my RPG. Nested classes? Delegates?

2024-04-03 Thread Liam McGillivray via Digitalmars-d-learn
For my tactical role-playing game, I want to finally implement items and weapons. These are objects that a `Unit` object can make use of. Just as tools are often said to be an extension of their user, I want items to be an extension of the unit who uses them. I'm trying to figure out how to bes