1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Question about useless variables

Discussion in 'Development' started by Kyd, Apr 13, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    When I have useless not used variables in code 500+ can it slowdown my server?
     
  2. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Variables take up a small bit of the free memory. This does not necessarily mean the server becomes slower, but like t says, it does take up more memory, which could, in extreme amounts, cause potential crashes. *citation needed*
     
    Last edited: Apr 14, 2017
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    PHP would eventually perform a memory cleanup which would get rid of the unused vars.
     
    jasonwynn10 and Sandertv like this.
  4. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    I wonder if it actually possible to make so many variables that a server crashes. Interesting thing to find out.
     
    HimbeersaftLP, Muqsit and Matthew like this.
  5. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    does variables even consume memory?
    i know for a fact that starting repeating task that starts repeating task and does nothing more WILL crash the server but i doubt varaibles will
     
    Muqsit likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.