Make main not throw away temp objects on heap
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 25 Oct 2024 14:49:18 +0000 (16:49 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 25 Oct 2024 14:49:18 +0000 (16:49 +0200)
commitc1840c4501f774afcf118c21d6003088fedd17ef
tree2d33527c9d37586b6958a9258ddd11fa89bcc1b5
parent8ad01d1871ee1cc369b07b094cfc8dbd41a2b468
Make main not throw away temp objects on heap

The subject says that learnMateria "Copies the Materia passed as
a parameter and store it in memory so it can be cloned later."
From that I get that learnMateria makes a copy of the Materia passed
meaning we cant use "new AMateria()" to learn it, as we have no handle
to that object to delete it.
ex03/main.cpp