Depends...
eg. You own a property and have 3 kids. You leave one kid $500,000 cash and the 2nd kid a $500,000 property and the 3rd kid $1mil worth of shares with a $500,000 debt - but the debt is secured by the property and not the shares. Guess which kid gets nothing? The one that gets the property (NSW anyway)