My player wont get destroyed when he dies ,My player wont get destroyed when he dies

this is my code for health
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HeartSystem : MonoBehaviour
{
public GameObject hearts;
public GameObject Player;
private int life;
private bool dead;

private void Start()
{
    life = hearts.Length;
}

void Update()
{
    if (dead == true)
    {
    Destroy(Player.gameObject);
    }
}

public void TakeDamage(int d)
{
    if (life >= 1)
    {
        life -= d;
        Destroy(hearts[life].gameObject);
        if(life < 1)
        {
            dead = true;
        }
    }
}

}
,this is my code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HeartSystem : MonoBehaviour
{
public GameObject hearts;
public GameObject Player;
private int life;
private bool dead;

private void Start()
{
    life = hearts.Length;
}

void Update()
{
    if (dead == true)
    {
    Destroy(Player.gameObject);
    }
}

public void TakeDamage(int d)
{
    if (life >= 1)
    {
        life -= d;
        Destroy(hearts[life].gameObject);
        if(life < 1)
        {
            dead = true;
        }
    }
}

}

try changing it to Destroy(gameObject)