Simple Code that crashes Unity for some strange reason!

The beggining of the code below is my constructor, the end is the function it calls.

this.storage = InititalizeStorage(_colsAvailable, _rowsAvailable);
}

private InventorySlot[] InititalizeStorage(int cols, int rows)//, GUIStyle _style)
{
	InventorySlot[] storageSlots = new InventorySlot[cols * rows];
	
	for(int i = 0; i < storageSlots.Length; i++)
	     storageSlots *= new InventorySlot(null);//, _style);*
  •   return storageSlots;*
    
  • }*
    When InitializedStorage is called from another function in start it works fine.
    So my only question is why does unity say “Fatal Error! Allocating memory when not allowed to”?

Not sure about the Fatal Error, but it could have to do with the fact that

storage *= new InventorySlot(null);//, _style);*

is probably supposed to be
storageSlots = new InventorySlot(null);