Create a list for your hunters. A field in the hunter type Global HunterList:TList.
When you create a hunter, add it to this list.
Have a method in the prey type you call for the prey when it is killed.
In that method, loop through all hunters in the hunter list with eachin, and check to see if Hunter.Prey = Self. If so set Hunter.Prey to Null.
Now assuming that you have no other pointers in your program pointing to the prey, the prey will be removed as soon as the method ends.
If you have a list of prey, then you will need to remove the prey from that list in that method.
Also, now that the hunters are in a list you will need to remove them from the list when you want them to be deleted.
When you create a hunter, add it to this list.
Have a method in the prey type you call for the prey when it is killed.
In that method, loop through all hunters in the hunter list with eachin, and check to see if Hunter.Prey = Self. If so set Hunter.Prey to Null.
Now assuming that you have no other pointers in your program pointing to the prey, the prey will be removed as soon as the method ends.
If you have a list of prey, then you will need to remove the prey from that list in that method.
Also, now that the hunters are in a list you will need to remove them from the list when you want them to be deleted.