generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: tr1::bad_weak_ptr

Previous Thread :: Next Thread 
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
02 Dec 2012 09:38 AM
local p = Instance.new("Model")
Instance.new("Model", p)
p.DescendantRemoving:connect(function(c) return c.Parent end)
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
02 Dec 2012 09:47 AM
Oh.
Report Abuse
IgnisCitrinus is not online. IgnisCitrinus
Joined: 23 Dec 2011
Total Posts: 1245
02 Dec 2012 09:49 AM
Oh.
Report Abuse
mustyoshi is not online. mustyoshi
Top 50 Poster
Joined: 27 Dec 2007
Total Posts: 41651
02 Dec 2012 09:53 AM
Dat memory leak?

~Monica mustyoshi mustyoshi mustyoshi mustyoshi
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
02 Dec 2012 10:01 AM
@mustyoshi

I think so.
Note that most properties of the descendant that's being removed are still valid; it only throws an exception when reading the Parent property.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
02 Dec 2012 10:02 AM
I don't understand this so I shouldn't post and just look at it in confusion.
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
02 Dec 2012 10:07 AM
I'm surprised that the event executes.
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
02 Dec 2012 10:24 AM
@Flurite

Yeah, me too.
The only thing I can think of is that the garbage collector calls the Destroy method when collecting an Instance.
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
02 Dec 2012 10:33 AM
Yeah, but also it registers before the model is destroyed.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image