I’m getting this error with JSLint: Only properties should be deleted
Why doesn’t it like this? The variable I am attempting to delete is very large, so I was hoping to get a jump on the garbage collection. Is this not ok?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
deleteis meant to delete properties on an object, not regular variables (properties on a VariableObject).Instead, you could set all references to the value as
null. JavaScript’s GC will clean it up when it feels it needs to.